Package org.alfresco.util
Class LogUtil
- java.lang.Object
-
- org.alfresco.util.LogUtil
-
public class LogUtil extends java.lang.Object
Utility class to assist with I18N of log messages.Calls to this class should still be wrapped with the appropriate log level checks:
if (logger.isDebugEnabled()) { LogUtil.debug(logger, MSG_EXECUTING_STATEMENT, sql); }
- Since:
- 2.1
- Author:
- Derek Hulley
- See Also:
I18NUtil
-
-
Constructor Summary
Constructors Constructor Description LogUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
debug(org.apache.commons.logging.Log logger, java.lang.String messageKey, java.lang.Object... args)
Log an I18Nized message to DEBUG.static void
error(org.apache.commons.logging.Log logger, java.lang.String messageKey, java.lang.Object... args)
Log an I18Nized message to ERROR.static void
error(org.apache.commons.logging.Log logger, java.lang.Throwable e, java.lang.String messageKey, java.lang.Object... args)
Log an I18Nized message to ERROR with a given source error.static void
info(org.apache.commons.logging.Log logger, java.lang.String messageKey, java.lang.Object... args)
Log an I18Nized message to INFO.static void
warn(org.apache.commons.logging.Log logger, java.lang.String messageKey, java.lang.Object... args)
Log an I18Nized message to WARN.
-
-
-
Method Detail
-
debug
public static final void debug(org.apache.commons.logging.Log logger, java.lang.String messageKey, java.lang.Object... args)
Log an I18Nized message to DEBUG.- Parameters:
logger
- the logger to usemessageKey
- the message keyargs
- the required message arguments
-
info
public static final void info(org.apache.commons.logging.Log logger, java.lang.String messageKey, java.lang.Object... args)
Log an I18Nized message to INFO.- Parameters:
logger
- the logger to usemessageKey
- the message keyargs
- the required message arguments
-
warn
public static final void warn(org.apache.commons.logging.Log logger, java.lang.String messageKey, java.lang.Object... args)
Log an I18Nized message to WARN.- Parameters:
logger
- the logger to usemessageKey
- the message keyargs
- the required message arguments
-
error
public static final void error(org.apache.commons.logging.Log logger, java.lang.String messageKey, java.lang.Object... args)
Log an I18Nized message to ERROR.- Parameters:
logger
- the logger to usemessageKey
- the message keyargs
- the required message arguments
-
error
public static final void error(org.apache.commons.logging.Log logger, java.lang.Throwable e, java.lang.String messageKey, java.lang.Object... args)
Log an I18Nized message to ERROR with a given source error.- Parameters:
logger
- the logger to usee
- the exception cause of the issuemessageKey
- the message keyargs
- the required message arguments
-
-