info to debug log level changes at server side
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/user-statistics@124637 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
008467ed01
commit
5646ec4a7c
|
@ -50,7 +50,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
|
|||
@Override
|
||||
public void init() {
|
||||
// get connection to Cassandra
|
||||
_log.info("Getting connection to Cassandra..");
|
||||
_log.debug("Getting connection to Cassandra..");
|
||||
store = new DBCassandraAstyanaxImpl();
|
||||
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
|
|||
@Override
|
||||
public void destroy(){
|
||||
// shutting down connection to Cassandra
|
||||
_log.info("Closing connection to Cassandra");
|
||||
_log.debug("Closing connection to Cassandra");
|
||||
store.closeConnection();
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
|
|||
|
||||
}else{
|
||||
|
||||
_log.info("Getting " + userName + " amount of workspace in use.");
|
||||
_log.debug("Getting " + userName + " amount of workspace in use.");
|
||||
|
||||
try{
|
||||
|
||||
|
@ -156,7 +156,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
|
|||
storageInUse = formatFileSize(storage);
|
||||
|
||||
long end = System.currentTimeMillis();
|
||||
_log.info("[USER-STATISTICS] time taken to retrieve user space is " + (end - init) + "ms");
|
||||
_log.debug("[USER-STATISTICS] time taken to retrieve user space is " + (end - init) + "ms");
|
||||
|
||||
}catch(Exception e){
|
||||
|
||||
|
@ -200,7 +200,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
|
|||
profileStrenght = evaluateProfileStrenght(user, avatarPresent);
|
||||
|
||||
long end = System.currentTimeMillis();
|
||||
_log.info("[USER-STATISTICS] time taken to evaluate user profile strenght is " + (end - init) + "ms");
|
||||
_log.debug("[USER-STATISTICS] time taken to evaluate user profile strenght is " + (end - init) + "ms");
|
||||
|
||||
}catch(Exception e){
|
||||
|
||||
|
@ -233,11 +233,11 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
|
|||
// If the user is in the root panel, we have to send him the overall number of posts made, comments/likes(received) and the space in use.
|
||||
// Otherwise we have to filter on the vre.
|
||||
boolean isInfrastructure = isInfrastructureScope();
|
||||
_log.info("User scope is " + (isInfrastructure ? " the whole infrastucture " : " a VRE"));
|
||||
_log.debug("User scope is " + (isInfrastructure ? " the whole infrastucture " : " a VRE"));
|
||||
|
||||
// get path of the avatar
|
||||
String thumbnailURL = session.getUserAvatarId();
|
||||
_log.info(userName + " avatar has url " + thumbnailURL);
|
||||
_log.debug(userName + " avatar has url " + thumbnailURL);
|
||||
|
||||
// get the vre (if not in the infrastructure)
|
||||
String actualVre = null;
|
||||
|
@ -253,7 +253,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
|
|||
String accountURL = null;
|
||||
ThemeDisplay themeDisplay = (ThemeDisplay) this.getThreadLocalRequest().getSession().getAttribute(WebKeys.THEME_DISPLAY);
|
||||
accountURL = themeDisplay.getURLMyAccount().toString();
|
||||
_log.info("Account url for " + userName + " is " + accountURL);
|
||||
_log.debug("Account url for " + userName + " is " + accountURL);
|
||||
|
||||
return new UserInformation(isInfrastructure, thumbnailURL, userName, actualVre, accountURL);
|
||||
}
|
||||
|
@ -286,16 +286,16 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
|
|||
Date oneYearAgo = new Date();
|
||||
oneYearAgo.setYear(oneYearAgo.getYear() - 1);
|
||||
|
||||
_log.info("Reference time is " + oneYearAgo.toString());
|
||||
_log.debug("Reference time is " + oneYearAgo.toString());
|
||||
|
||||
try {
|
||||
|
||||
long init = System.currentTimeMillis();
|
||||
_log.info("Getting " + userName + " feeds in the last year.");
|
||||
_log.debug("Getting " + userName + " feeds in the last year.");
|
||||
|
||||
List<Feed> userFeeds = store.getRecentFeedsByUserAndDate(userName, oneYearAgo.getTime());
|
||||
|
||||
_log.info("Evaluating number of comments and likes of " + userName + "'s feeds.");
|
||||
_log.debug("Evaluating number of comments and likes of " + userName + "'s feeds.");
|
||||
|
||||
for (Feed feed : userFeeds) {
|
||||
|
||||
|
@ -319,10 +319,10 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
|
|||
|
||||
long end = System.currentTimeMillis();
|
||||
|
||||
_log.info("[USER-STATISTICS] time taken to retrieve and filter user feeds, get likes and replies got is " + (end - init) + "ms");
|
||||
_log.info("Total number of feeds (after time filtering) of " + userName + " is " + totalFeeds);
|
||||
_log.info("Total number of likes (after time filtering) for " + userName + " is " + totalLikes);
|
||||
_log.info("Total number of comments (after time filtering) for " + userName + " is " + totalComments);
|
||||
_log.debug("[USER-STATISTICS] time taken to retrieve and filter user feeds, get likes and replies got is " + (end - init) + "ms");
|
||||
_log.debug("Total number of feeds (after time filtering) of " + userName + " is " + totalFeeds);
|
||||
_log.debug("Total number of likes (after time filtering) for " + userName + " is " + totalLikes);
|
||||
_log.debug("Total number of comments (after time filtering) for " + userName + " is " + totalComments);
|
||||
|
||||
}catch(Exception e){
|
||||
_log.error(e.toString());
|
||||
|
|
Loading…
Reference in New Issue