added liferay logger so that we can change log level at runtime
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-mail-servlet@130859 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c36199d773
commit
6cd25ea0a9
|
@ -57,9 +57,9 @@ import org.gcube.portal.notifications.thread.MessageNotificationsThread;
|
|||
import org.gcube.vomanagement.usermanagement.UserManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
|
||||
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.liferay.portal.kernel.log.Log;
|
||||
import com.liferay.portal.kernel.log.LogFactoryUtil;
|
||||
import com.sun.mail.util.MailSSLSocketFactory;
|
||||
|
||||
/**
|
||||
|
@ -68,7 +68,7 @@ import com.sun.mail.util.MailSSLSocketFactory;
|
|||
*
|
||||
*/
|
||||
public class PeriodicTask implements Runnable {
|
||||
private static final Logger _log = LoggerFactory.getLogger(PeriodicTask.class);
|
||||
private static final Log _log = LogFactoryUtil.getLog(PeriodicTask.class);
|
||||
private static final String APP_ID_NEWSFEED = "org.gcube.portlets.user.newsfeed.server.NewsServiceImpl";
|
||||
|
||||
private DatabookStore socialStore;
|
||||
|
@ -89,7 +89,7 @@ public class PeriodicTask implements Runnable {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
_log.info("PeriodicTask starting for portal/site having name: " + popAccount.getPortalName());
|
||||
_log.debug("PeriodicTask starting for portal/site having name: " + popAccount.getPortalName());
|
||||
check(popAccount.getPortalName(), popAccount.getPop3Server(), popAccount.getPop3user(), popAccount.getPop3password());
|
||||
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ public class PeriodicTask implements Runnable {
|
|||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
_log.debug("Found message reply, subject: " + subject, " body: " + messageText);
|
||||
_log.debug("Found message reply, subject: " + subject + " body: " + messageText);
|
||||
String newMessageId = null;
|
||||
Workspace workspace;
|
||||
List<String> recipientIds = null;
|
||||
|
@ -274,14 +274,14 @@ public class PeriodicTask implements Runnable {
|
|||
_log.debug("Constructing reply message");
|
||||
messageText += getReplyHeaderMessage(sender, originalSentTime, originalText);
|
||||
|
||||
_log.debug("Trying to send message with subject: " + subject, " to: " + recipientIds.toString());
|
||||
_log.debug("Trying to send message with subject: " + subject + " to: " + recipientIds.toString());
|
||||
newMessageId = messageManager.sendMessageToPortalLogins(subject, messageText, new ArrayList<String>(), recipientIds);
|
||||
|
||||
} catch (WorkspaceFolderNotFoundException | InternalErrorException | HomeNotFoundException | ItemNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
_log.debug("Message with subject: " + subject, " hase been sent, returned id: " + newMessageId);
|
||||
_log.debug("Message with subject: " + subject + " hase been sent, returned id: " + newMessageId);
|
||||
|
||||
if (newMessageId != null) {
|
||||
_log.debug("Sending message notifications ... site server URL= " + site.getSiteURL());
|
||||
|
|
Loading…
Reference in New Issue