removed noisy logs

This commit is contained in:
Ahmed Salah Tawfik Ibrahim 2024-04-22 10:55:27 +02:00
parent 364b076af2
commit fc04f95b45
3 changed files with 28 additions and 24 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## [v3.0.1-SNAPSHOT] - 2023-04-22
- Feature 27286: removed noisy logs
## [v3.0.0-SNAPSHOT] - 2023-12-06
- Feature #26193, new impl for get users by role in a VRE

View File

@ -12,7 +12,7 @@
<groupId>org.gcube.portal</groupId>
<artifactId>social-networking-library-ws</artifactId>
<packaging>war</packaging>
<version>3.0.0-SNAPSHOT</version>
<version>3.0.1-SNAPSHOT</version>
<name>social-networking-library-ws</name>
<description>Rest interface for the social networking library.</description>
<properties>

View File

@ -50,7 +50,7 @@ public class Lib {
ResponseBean responseBean = new ResponseBean();
Status status = Status.OK;
try {
logger.info("Writing comment with commentid " + comment.getKey());
logger.debug("Writing comment with commentid " + comment.getKey());
boolean result = CassandraConnection.getInstance().getDatabookStore().addComment(comment);
responseBean.setResult(result);
responseBean.setMessage("");
@ -72,7 +72,7 @@ public class Lib {
ResponseBean responseBean = new ResponseBean();
Status status = Status.OK;
try{
logger.info("Getting comment with commentid " + commentid);
logger.debug("Getting comment with commentid " + commentid);
Comment result = CassandraConnection.getInstance().getDatabookStore().readCommentById(commentid);
responseBean.setResult(result);
responseBean.setMessage("");
@ -103,7 +103,7 @@ public class Lib {
List<Comment> comments = null;
try{
logger.info("Retrieving comments for postid " + postid);
logger.debug("Retrieving comments for postid " + postid);
comments = CassandraConnection.getInstance().getDatabookStore().getAllCommentByPost(postid);
responseBean.setResult(comments);
responseBean.setSuccess(true);
@ -133,7 +133,7 @@ public class Lib {
List<Comment> comments = null;
try{
logger.info("Retrieving comments for user id " + username);
logger.debug("Retrieving comments for user id " + username);
comments = CassandraConnection.getInstance().getDatabookStore().getRecentCommentsByUserAndDate(username, timeInMillis);
responseBean.setResult(comments);
responseBean.setMessage("");
@ -160,7 +160,7 @@ public class Lib {
ResponseBean responseBean = new ResponseBean();
Status status = Status.OK;
try{
logger.info("Writing comment with commentid " + comment.getKey());
logger.debug("Writing comment with commentid " + comment.getKey());
boolean result = CassandraConnection.getInstance().getDatabookStore().editComment(comment);
responseBean.setResult(result);
responseBean.setMessage("");
@ -187,7 +187,7 @@ public class Lib {
ResponseBean responseBean = new ResponseBean();
Status status = Status.OK;
try{
logger.info("deleting comment with commentid " + commentid);
logger.debug("deleting comment with commentid " + commentid);
boolean result = CassandraConnection.getInstance().getDatabookStore().deleteComment(commentid, postid);
responseBean.setResult(result);
responseBean.setMessage("");
@ -218,7 +218,7 @@ public class Lib {
ResponseBean responseBean = new ResponseBean();
Status status = Status.OK;
try{
logger.info("Saving hashtags " );
logger.debug("Saving hashtags " );
boolean result = CassandraConnection.getInstance().getDatabookStore().saveHashTags(feedid,vreid,hashtags);
responseBean.setResult(result);
responseBean.setMessage("");
@ -249,7 +249,7 @@ public class Lib {
ResponseBean responseBean = new ResponseBean();
Status status = Status.OK;
try{
logger.info("deleting hashtags " );
logger.debug("deleting hashtags " );
boolean result = CassandraConnection.getInstance().getDatabookStore().deleteHashTags(feedid,vreid,hashtags);
responseBean.setResult(result);
responseBean.setMessage("");
@ -280,7 +280,7 @@ public class Lib {
ResponseBean responseBean = new ResponseBean();
Status status = Status.OK;
try{
logger.info("Saving hashtags comments " );
logger.debug("Saving hashtags comments " );
boolean result = CassandraConnection.getInstance().getDatabookStore().saveHashTagsComment(commentid,vreid,hashtags);
responseBean.setResult(result);
responseBean.setMessage("");
@ -310,7 +310,7 @@ public class Lib {
ResponseBean responseBean = new ResponseBean();
Status status = Status.OK;
try{
logger.info("deleting hashtags " );
logger.debug("deleting hashtags " );
boolean result = CassandraConnection.getInstance().getDatabookStore().deleteHashTagsComment(commentid,vreid,hashtags);
responseBean.setResult(result);
responseBean.setMessage("");
@ -338,7 +338,7 @@ public class Lib {
Map<String, Integer> hashtags = null;
try{
logger.info("getting vre hashtags occurrences " + vreid);
logger.debug("getting vre hashtags occurrences " + vreid);
hashtags = CassandraConnection.getInstance().getDatabookStore().getVREHashtagsWithOccurrence(vreid);
responseBean.setResult(hashtags);
responseBean.setMessage("");
@ -369,7 +369,7 @@ public class Lib {
Map<String, Integer> hashtags = null;
try{
logger.info("getting vre hashtags occurrences " + vreid);
logger.debug("getting vre hashtags occurrences " + vreid);
hashtags = CassandraConnection.getInstance().getDatabookStore().getVREHashtagsWithOccurrenceFilteredByTime(vreid, timestamp);
responseBean.setResult(hashtags);
responseBean.setMessage("");
@ -399,7 +399,7 @@ public class Lib {
List<Post> posts = null;
try{
logger.info("getting vre hashtags occurrences " + vreid);
logger.debug("getting vre hashtags occurrences " + vreid);
posts = CassandraConnection.getInstance().getDatabookStore().getVREPostsByHashtag(vreid, hashtag);
responseBean.setResult(posts);
responseBean.setMessage("");
@ -428,7 +428,7 @@ public class Lib {
String inv = null;
try{
logger.info("Retrieving invite for vre " + vreid);
logger.debug("Retrieving invite for vre " + vreid);
inv = CassandraConnection.getInstance().getDatabookStore().isExistingInvite(vreid, email);
responseBean.setResult(inv);
responseBean.setMessage("");
@ -481,7 +481,7 @@ public class Lib {
Invite inv = null;
try{
logger.info("Retrieving invite for id " + inviteid);
logger.debug("Retrieving invite for id " + inviteid);
inv = CassandraConnection.getInstance().getDatabookStore().readInvite(inviteid);
responseBean.setResult(inv);
responseBean.setMessage("");
@ -570,7 +570,7 @@ public class Lib {
ResponseBean responseBean = new ResponseBean();
Status status = Status.OK;
try{
logger.info("Writing like with likeid " + like.getKey());
logger.debug("Writing like with likeid " + like.getKey());
boolean result = CassandraConnection.getInstance().getDatabookStore().like(like);
responseBean.setResult(result);
responseBean.setMessage("");
@ -599,7 +599,7 @@ public class Lib {
ResponseBean responseBean = new ResponseBean();
Status status = Status.OK;
try{
logger.info("Writing unlike with likeid " + likeid);
logger.debug("Writing unlike with likeid " + likeid);
boolean result = CassandraConnection.getInstance().getDatabookStore().unlike(userid,likeid,feedid);
responseBean.setResult(result);
responseBean.setMessage("");
@ -627,7 +627,7 @@ public class Lib {
List<String> likes = null;
try{
logger.info("Retrieving likes for user id " + userid);
logger.debug("Retrieving likes for user id " + userid);
likes = CassandraConnection.getInstance().getDatabookStore().getAllLikedPostIdsByUser(userid);
responseBean.setResult(likes);
responseBean.setMessage("");
@ -655,7 +655,7 @@ public class Lib {
List<Like> likes = null;
try{
logger.info("Retrieving likes for post id " + postid);
logger.debug("Retrieving likes for post id " + postid);
likes = CassandraConnection.getInstance().getDatabookStore().getAllLikesByPost(postid);
responseBean.setResult(likes);
responseBean.setMessage("");
@ -928,9 +928,9 @@ public class Lib {
) throws ValidationException{
ResponseBean responseBean = new ResponseBean();
for(NotificationType notificationType: enabledChannels.keySet()){
logger.info("Type: " + notificationType.toString());
logger.debug("Type: " + notificationType.toString());
for(NotificationChannelType channelType: enabledChannels.get(notificationType)){
logger.info(channelType.toString());
logger.debug(channelType.toString());
}
}
Status status = Status.OK;
@ -1017,8 +1017,8 @@ public class Lib {
responseBean.setMessage("");
responseBean.setSuccess(result);
}catch(Exception e){
logger.info("Unable to write attachment.", e);
logger.info(e.getMessage());
logger.error("Unable to write attachment.", e);
logger.error(e.getMessage());
responseBean.setMessage(e.getMessage());
responseBean.setSuccess(false);
status = Status.INTERNAL_SERVER_ERROR;