edu.internet2.middleware.grouper.app.messagingProvisioning.GrouperMessagingLog Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grouper Show documentation
Show all versions of grouper Show documentation
Internet2 Groups Management Toolkit
package edu.internet2.middleware.grouper.app.messagingProvisioning;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import edu.internet2.middleware.grouperClient.util.GrouperClientUtils;
public class GrouperMessagingLog {
/** logger */
private static final Log LOG = edu.internet2.middleware.grouper.util.GrouperUtil.getLog(GrouperMessagingLog.class);
/**
* log something to the log file
* @param message
*/
public static void messagingLog(String message) {
LOG.debug(message);
}
/**
* log something to the log file
* @param messageMap
* @param startTimeNanos nanos when the request started
*/
public static void messagingLog(Map messageMap, Long startTimeNanos) {
if (LOG.isDebugEnabled()) {
if (messageMap != null && startTimeNanos != null) {
messageMap.put("elapsedMillis", (System.nanoTime() - startTimeNanos) / 1000000);
}
LOG.debug(GrouperClientUtils.mapToString(messageMap));
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy