Skip to content

Commit

Permalink
Merge pull request sakaiproject#2261 from ern/SAK-30828
Browse files Browse the repository at this point in the history
SAK-30828 Normalize sakai logging
  • Loading branch information
ern committed Apr 27, 2016
2 parents 654197b + dfa2947 commit 383f8cb
Show file tree
Hide file tree
Showing 1,929 changed files with 28,158 additions and 30,509 deletions.
5 changes: 0 additions & 5 deletions access/access-impl/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@
<groupId>org.sakaiproject.velocity</groupId>
<artifactId>sakai-velocity-tool</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${sakai.commons-logging.version}</version>
</dependency>
</dependencies>
<build>
<resources>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sakaiproject.authz.api.SecurityAdvisor;
import org.sakaiproject.authz.api.SecurityService;
import org.sakaiproject.cheftool.VmServlet;
Expand Down Expand Up @@ -74,7 +74,7 @@
public class AccessServlet extends VmServlet
{
/** Our log (commons). */
private static Log M_log = LogFactory.getLog(AccessServlet.class);
private static Logger M_log = LoggerFactory.getLogger(AccessServlet.class);

/** Resource bundle using current language locale */
protected static ResourceLoader rb = new ResourceLoader("access");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUpload;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sakaiproject.component.cover.ComponentManager;
import org.sakaiproject.content.api.ContentCollection;
import org.sakaiproject.content.api.ContentHostingService;
Expand Down Expand Up @@ -62,7 +62,7 @@
public class WebServlet extends AccessServlet
{
/** Our log (commons). */
private static Log M_log = LogFactory.getLog(WebServlet.class);
private static Logger M_log = LoggerFactory.getLogger(WebServlet.class);
protected ContentHostingService contentHostingService;
protected UserDirectoryService userDirectoryService;
protected TimeService timeService;
Expand Down
4 changes: 0 additions & 4 deletions alias/alias-tool/tool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
<groupId>org.sakaiproject.kernel</groupId>
<artifactId>sakai-component-manager</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.velocity</groupId>
<artifactId>sakai-velocity-tool-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.Iterator;
import java.util.List;

import lombok.extern.slf4j.Slf4j;
import org.sakaiproject.alias.api.AliasEdit;
import org.sakaiproject.alias.api.AliasService;
import org.sakaiproject.authz.api.SecurityService;
Expand Down Expand Up @@ -55,6 +56,7 @@
* AliasesAction is the Sakai aliases editor.
* </p>
*/
@Slf4j
public class AliasesAction extends PagedResourceActionII
{
private static final long serialVersionUID = -5477742481219305334L;
Expand Down Expand Up @@ -143,7 +145,7 @@ else if (mode.equals("confirm"))
}
else
{
Log.warn("chef", "AliasesAction: mode: " + mode);
log.warn("mode: {}", mode);
template = buildListContext(state, context);
}

Expand Down Expand Up @@ -305,7 +307,7 @@ public void doEdit(RunData data, Context context)
}
catch (IdUnusedException e)
{
Log.warn("chef", "AliasesAction.doEdit: alias not found: " + id);
log.warn("alias not found: {}", id);

addAlert(state, rb.getFormattedMessage("alias.notfound", new Object[]{id}));
state.removeAttribute("mode");
Expand Down
4 changes: 0 additions & 4 deletions announcement/announcement-impl/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@
<groupId>org.sakaiproject.scheduler</groupId>
<artifactId>scheduler-api</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
import javax.xml.transform.stream.StreamResult;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sakaiproject.alias.api.Alias;
import org.sakaiproject.alias.api.AliasService;
import org.sakaiproject.announcement.api.AnnouncementChannel;
Expand Down Expand Up @@ -110,7 +110,7 @@ public abstract class BaseAnnouncementService extends BaseMessage implements Ann
EntityTransferrer, EntityTransferrerRefMigrator
{
/** Our logger. */
private static Log M_log = LogFactory.getLog(BaseAnnouncementService.class);
private static Logger M_log = LoggerFactory.getLogger(BaseAnnouncementService.class);

/** private constants definitions */
private final static String SAKAI_ANNOUNCEMENT_TOOL_ID = "sakai.announcements";
Expand Down Expand Up @@ -1668,7 +1668,7 @@ private void setMessageUnreleasedMax(int currentMax) {
}
}
} catch (PermissionException ex) {
M_log.error(ex);
M_log.error(ex.getMessage());
}
}

Expand All @@ -1689,7 +1689,7 @@ private int setMessageOrderMax(MessageEdit msg) {
}
msg.getHeaderEdit().setMessage_order(++currentMax);
} catch (PermissionException ex) {
M_log.error(ex);
M_log.error(ex.getMessage());
}
return currentMax;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import java.util.List;
import java.util.Stack;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sakaiproject.authz.api.AuthzGroup;
import org.sakaiproject.authz.api.GroupNotDefinedException;
import org.sakaiproject.authz.api.Role;
Expand Down Expand Up @@ -60,7 +60,7 @@
public class DbAnnouncementService extends BaseAnnouncementService
{
/** Our logger. */
private static Log M_log = LogFactory.getLog(DbAnnouncementService.class);
private static Logger M_log = LoggerFactory.getLogger(DbAnnouncementService.class);

/** The name of the db table holding announcement channels. */
protected String m_cTableName = "ANNOUNCEMENT_CHANNEL";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import java.util.Iterator;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sakaiproject.announcement.api.AnnouncementChannel;
import org.sakaiproject.announcement.api.AnnouncementMessage;
import org.sakaiproject.announcement.api.AnnouncementMessageEdit;
Expand Down Expand Up @@ -73,7 +73,7 @@ public class SiteEmailNotificationAnnc extends SiteEmailNotification
private static final String PORTLET_CONFIG_PARM_MERGED_CHANNELS = "mergedAnnouncementChannels";

/** Our logger. */
private static Log M_log = LogFactory.getLog(SiteEmailNotificationAnnc.class);
private static Logger M_log = LoggerFactory.getLogger(SiteEmailNotificationAnnc.class);

private EntityManager entityManager;
private SecurityService securityService;
Expand Down
8 changes: 0 additions & 8 deletions announcement/announcement-tool/tool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
Expand All @@ -84,10 +80,6 @@
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.NumberUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sakaiproject.announcement.api.AnnouncementChannel;
import org.sakaiproject.announcement.api.AnnouncementMessage;
import org.sakaiproject.announcement.api.AnnouncementMessageHeader;
Expand Down Expand Up @@ -92,7 +92,7 @@ public class AnnouncementEntityProviderImpl extends AbstractEntityProvider imple
private static final String MOTD_CHANNEL_SUFFIX = "motd";
public static int DEFAULT_NUM_ANNOUNCEMENTS = 3;
public static int DEFAULT_DAYS_IN_PAST = 10;
private static final Log log = LogFactory.getLog(AnnouncementEntityProviderImpl.class);
private static final Logger log = LoggerFactory.getLogger(AnnouncementEntityProviderImpl.class);
private static ResourceLoader rb = new ResourceLoader("announcement");

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
import java.text.RuleBasedCollator;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sakaiproject.announcement.api.AnnouncementChannel;
import org.sakaiproject.announcement.api.AnnouncementChannelEdit;
import org.sakaiproject.announcement.api.AnnouncementMessage;
Expand Down Expand Up @@ -126,7 +126,7 @@
public class AnnouncementAction extends PagedResourceActionII
{
/** Our logger. */
private static Log M_log = LogFactory.getLog(AnnouncementAction.class);
private static Logger M_log = LoggerFactory.getLogger(AnnouncementAction.class);

/** Resource bundle using current language locale */
private static ResourceLoader rb = new ResourceLoader("announcement");
Expand Down Expand Up @@ -1171,10 +1171,8 @@ else if (view.equals(VIEW_MODE_PUBLIC))
menu_new = channel.allowAddMessage();
menu_delete = channel.allowRemoveMessage(message);
menu_revise = channel.allowEditMessage(message.getId());
} catch (IdUnusedException e) {
M_log.error(e);
} catch (PermissionException e) {
M_log.error(e);
} catch (IdUnusedException | PermissionException e) {
M_log.error(e.getMessage());
}

}
Expand Down Expand Up @@ -1940,7 +1938,7 @@ protected String buildPreviewContext(VelocityPortlet portlet, Context context, R
context.put("annToGroups", allGroupString);

} catch (IdUnusedException e1) {
M_log.error(e1);
M_log.error(e1.getMessage());
}
}

Expand Down Expand Up @@ -4868,10 +4866,8 @@ public void doReorderUpdate(RunData rundata, Context context)
messageOrder++;
}
}
} catch (PermissionException e1) {
M_log.error(e1);
} catch (IdUnusedException e1) {
M_log.error(e1);
} catch (PermissionException | IdUnusedException e1) {
M_log.error(e1.getMessage());
}
}
}
Expand Down
8 changes: 0 additions & 8 deletions archive/archive-tool/tool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
<groupId>org.sakaiproject.common</groupId>
<artifactId>archive-api</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.velocity</groupId>
<artifactId>sakai-velocity-tool-api</artifactId>
Expand All @@ -53,10 +49,6 @@
<groupId>org.sakaiproject.kernel</groupId>
<artifactId>sakai-component-manager</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.filefilter.SuffixFileFilter;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sakaiproject.archive.api.ArchiveService;
import org.sakaiproject.archive.tool.model.SparseFile;
import org.sakaiproject.archive.tool.model.SparseSite;
Expand Down Expand Up @@ -89,7 +89,7 @@ public class ArchiveAction
private SecurityService securityService;
private IdManager idManager;

private static final Log log = LogFactory.getLog(ArchiveAction.class);
private static final Logger log = LoggerFactory.getLogger(ArchiveAction.class);

// for batch archive
private long batchArchiveStarted = 0;
Expand Down
4 changes: 0 additions & 4 deletions archive/import-handlers/announcement-handlers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
<groupId>org.sakaiproject.kernel</groupId>
<artifactId>sakai-kernel-api</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.common</groupId>
<artifactId>archive-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

package org.sakaiproject.importer.impl.handlers;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.sakaiproject.announcement.api.AnnouncementChannel;
import org.sakaiproject.announcement.api.AnnouncementService;
Expand All @@ -38,7 +38,7 @@
*/
public class AnnouncementHandler implements HandlesImportable {

private static Log log = LogFactory.getLog(AnnouncementHandler.class);
private static Logger log = LoggerFactory.getLogger(AnnouncementHandler.class);

protected AnnouncementService announcementService = null;

Expand Down
6 changes: 0 additions & 6 deletions archive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${sakai.lombok.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
4 changes: 0 additions & 4 deletions assignment/assignment-impl/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@
<groupId>org.sakaiproject.taggable</groupId>
<artifactId>sakai-taggable-api</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.sakaiproject.assignment.api.Assignment;
import org.sakaiproject.assignment.api.AssignmentService;
Expand All @@ -51,7 +51,7 @@

public class AssignmentGradeInfoProvider implements ExternalAssignmentProvider, ExternalAssignmentProviderCompat {

private Log log = LogFactory.getLog(AssignmentGradeInfoProvider.class);
private Logger log = LoggerFactory.getLogger(AssignmentGradeInfoProvider.class);

// Sakai Service Beans
private AssignmentService assignmentService;
Expand Down
Loading

0 comments on commit 383f8cb

Please sign in to comment.