|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mazz.i18n.Logger mazz.i18n.commons.CommonsLogger
public class CommonsLogger
Similar in functionality to the CommonsLogMsg
utility class, this provides the ability to log messages
that are retrieved from a resource bundle with the additional capability of being able to set the base bundle
name and locale that this logger will use to log the message. If the locale is not specified or
null
, the LoggerLocale
will be used to determine what locale will be used.
Field Summary |
---|
Fields inherited from class mazz.i18n.Logger |
---|
SYSPROP_DUMP_LOG_KEYS, SYSPROP_DUMP_STACK_TRACES |
Constructor Summary | |
---|---|
CommonsLogger(java.lang.Class clazz)
|
|
CommonsLogger(java.lang.Class clazz,
java.util.Locale locale)
|
|
CommonsLogger(java.lang.Class clazz,
Msg.BundleBaseName basename)
|
|
CommonsLogger(java.lang.Class clazz,
Msg.BundleBaseName basename,
java.util.Locale locale)
|
|
CommonsLogger(java.lang.String name)
|
|
CommonsLogger(java.lang.String name,
java.util.Locale locale)
|
|
CommonsLogger(java.lang.String name,
Msg.BundleBaseName basename)
|
|
CommonsLogger(java.lang.String name,
Msg.BundleBaseName basename,
java.util.Locale locale)
|
Method Summary | |
---|---|
protected void |
createLogObject(java.lang.Class clazz)
Creates the Commons-Logging log object. |
protected void |
createLogObject(java.lang.String name)
Creates the Commons-Logging log object. |
Msg |
debug(java.lang.String key,
java.lang.Object... varargs)
Calls CommonsLogMsg.debug(Log, Msg.BundleBaseName, Locale, String, Object[]) to log the message. |
Msg |
debug(java.lang.Throwable throwable,
java.lang.String key,
java.lang.Object... varargs)
Calls CommonsLogMsg.debug(Log, Throwable, Msg.BundleBaseName, Locale, String, Object[]) to log the
message. |
Msg |
error(java.lang.String key,
java.lang.Object... varargs)
Calls CommonsLogMsg.error(Log, Msg.BundleBaseName, Locale, String, Object[]) to log the message. |
Msg |
error(java.lang.Throwable throwable,
java.lang.String key,
java.lang.Object... varargs)
Calls CommonsLogMsg.error(Log, Throwable, Msg.BundleBaseName, Locale, String, Object[]) to log the
message. |
Msg |
fatal(java.lang.String key,
java.lang.Object... varargs)
Calls CommonsLogMsg.fatal(Log, Msg.BundleBaseName, Locale, String, Object[]) to log the message. |
Msg |
fatal(java.lang.Throwable throwable,
java.lang.String key,
java.lang.Object... varargs)
Calls CommonsLogMsg.fatal(Log, Throwable, Msg.BundleBaseName, Locale, String, Object[]) to log the
message. |
Msg |
info(java.lang.String key,
java.lang.Object... varargs)
Calls CommonsLogMsg.info(Log, Msg.BundleBaseName, Locale, String, Object[]) to log the message. |
Msg |
info(java.lang.Throwable throwable,
java.lang.String key,
java.lang.Object... varargs)
Calls CommonsLogMsg.info(Log, Throwable, Msg.BundleBaseName, Locale, String, Object[]) to log the
message. |
boolean |
isDebugEnabled()
Returns true if the debug log level is enabled |
boolean |
isErrorEnabled()
Returns true if the error log level is enabled |
boolean |
isFatalEnabled()
Returns true if the fatal log level is enabled |
boolean |
isInfoEnabled()
Returns true if the info log level is enabled |
boolean |
isTraceEnabled()
Returns true if the trace log level is enabled |
boolean |
isWarnEnabled()
Returns true if the warn log level is enabled |
Msg |
trace(java.lang.String key,
java.lang.Object... varargs)
Calls CommonsLogMsg.trace(Log, Msg.BundleBaseName, Locale, String, Object[]) to log the message. |
Msg |
trace(java.lang.Throwable throwable,
java.lang.String key,
java.lang.Object... varargs)
Calls CommonsLogMsg.trace(Log, Throwable, Msg.BundleBaseName, Locale, String, Object[]) to log the
message. |
Msg |
warn(java.lang.String key,
java.lang.Object... varargs)
Calls CommonsLogMsg.warn(Log, Msg.BundleBaseName, Locale, String, Object[]) to log the message. |
Msg |
warn(java.lang.Throwable throwable,
java.lang.String key,
java.lang.Object... varargs)
Calls CommonsLogMsg.warn(Log, Throwable, Msg.BundleBaseName, Locale, String, Object[]) to log the
message. |
Methods inherited from class mazz.i18n.Logger |
---|
getBaseBundleName, getDumpLogKeys, getDumpStackTraces, getLocale, getMsg, getMsgString, setDumpLogKeys, setDumpStackTraces |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommonsLogger(java.lang.String name, Msg.BundleBaseName basename, java.util.Locale locale)
Logger.Logger(String, Msg.BundleBaseName, Locale)
public CommonsLogger(java.lang.Class clazz, Msg.BundleBaseName basename, java.util.Locale locale)
Logger.Logger(Class, Msg.BundleBaseName, Locale)
public CommonsLogger(java.lang.String name, Msg.BundleBaseName basename)
Logger.Logger(String, Msg.BundleBaseName)
public CommonsLogger(java.lang.Class clazz, Msg.BundleBaseName basename)
Logger.Logger(Class, Msg.BundleBaseName)
public CommonsLogger(java.lang.String name, java.util.Locale locale)
Logger.Logger(String, Locale)
public CommonsLogger(java.lang.Class clazz, java.util.Locale locale)
Logger.Logger(Class, Locale)
public CommonsLogger(java.lang.String name)
Logger.Logger(String)
public CommonsLogger(java.lang.Class clazz)
Logger.Logger(Class)
Method Detail |
---|
public boolean isFatalEnabled()
Logger
true
if the fatal log level is enabled
isFatalEnabled
in class Logger
Logger.isFatalEnabled()
public boolean isErrorEnabled()
Logger
true
if the error log level is enabled
isErrorEnabled
in class Logger
Logger.isErrorEnabled()
public boolean isWarnEnabled()
Logger
true
if the warn log level is enabled
isWarnEnabled
in class Logger
Logger.isWarnEnabled()
public boolean isInfoEnabled()
Logger
true
if the info log level is enabled
isInfoEnabled
in class Logger
Logger.isInfoEnabled()
public boolean isDebugEnabled()
Logger
true
if the debug log level is enabled
isDebugEnabled
in class Logger
Logger.isDebugEnabled()
public boolean isTraceEnabled()
Logger
true
if the trace log level is enabled
isTraceEnabled
in class Logger
Logger.isTraceEnabled()
public Msg fatal(java.lang.Throwable throwable, java.lang.String key, java.lang.Object... varargs)
CommonsLogMsg.fatal(Log, Throwable, Msg.BundleBaseName, Locale, String, Object[])
to log the
message.
fatal
in class Logger
throwable
- the throwable to logkey
- the resource bundle key of the message to logvarargs
- the resource bundle message arguments
Logger.fatal(Throwable, String, Object[])
public Msg fatal(java.lang.String key, java.lang.Object... varargs)
CommonsLogMsg.fatal(Log, Msg.BundleBaseName, Locale, String, Object[])
to log the message.
fatal
in class Logger
key
- the resource bundle key of the message to logvarargs
- the resource bundle message arguments
Logger.fatal(String, Object[])
public Msg error(java.lang.Throwable throwable, java.lang.String key, java.lang.Object... varargs)
CommonsLogMsg.error(Log, Throwable, Msg.BundleBaseName, Locale, String, Object[])
to log the
message.
error
in class Logger
throwable
- the throwable to logkey
- the resource bundle key of the message to logvarargs
- the resource bundle message arguments
Logger.error(Throwable, String, Object[])
public Msg error(java.lang.String key, java.lang.Object... varargs)
CommonsLogMsg.error(Log, Msg.BundleBaseName, Locale, String, Object[])
to log the message.
error
in class Logger
key
- the resource bundle key of the message to logvarargs
- the resource bundle message arguments
Logger.error(String, Object[])
public Msg warn(java.lang.Throwable throwable, java.lang.String key, java.lang.Object... varargs)
CommonsLogMsg.warn(Log, Throwable, Msg.BundleBaseName, Locale, String, Object[])
to log the
message.
warn
in class Logger
throwable
- the throwable to logkey
- the resource bundle key of the message to logvarargs
- the resource bundle message arguments
Logger.warn(Throwable, String, Object[])
public Msg warn(java.lang.String key, java.lang.Object... varargs)
CommonsLogMsg.warn(Log, Msg.BundleBaseName, Locale, String, Object[])
to log the message.
warn
in class Logger
key
- the resource bundle key of the message to logvarargs
- the resource bundle message arguments
Logger.warn(String, Object[])
public Msg info(java.lang.Throwable throwable, java.lang.String key, java.lang.Object... varargs)
CommonsLogMsg.info(Log, Throwable, Msg.BundleBaseName, Locale, String, Object[])
to log the
message.
info
in class Logger
throwable
- the throwable to logkey
- the resource bundle key of the message to logvarargs
- the resource bundle message arguments
Logger.info(Throwable, String, Object[])
public Msg info(java.lang.String key, java.lang.Object... varargs)
CommonsLogMsg.info(Log, Msg.BundleBaseName, Locale, String, Object[])
to log the message.
info
in class Logger
key
- the resource bundle key of the message to logvarargs
- the resource bundle message arguments
Logger.info(String, Object[])
public Msg debug(java.lang.Throwable throwable, java.lang.String key, java.lang.Object... varargs)
CommonsLogMsg.debug(Log, Throwable, Msg.BundleBaseName, Locale, String, Object[])
to log the
message.
debug
in class Logger
throwable
- the throwable to logkey
- the resource bundle key of the message to logvarargs
- the resource bundle message arguments
Logger.debug(Throwable, String, Object[])
public Msg debug(java.lang.String key, java.lang.Object... varargs)
CommonsLogMsg.debug(Log, Msg.BundleBaseName, Locale, String, Object[])
to log the message.
debug
in class Logger
key
- the resource bundle key of the message to logvarargs
- the resource bundle message arguments
Logger.debug(String, Object[])
public Msg trace(java.lang.Throwable throwable, java.lang.String key, java.lang.Object... varargs)
CommonsLogMsg.trace(Log, Throwable, Msg.BundleBaseName, Locale, String, Object[])
to log the
message.
trace
in class Logger
throwable
- the throwable to logkey
- the resource bundle key of the message to logvarargs
- the resource bundle message arguments
Logger.trace(Throwable, String, Object[])
public Msg trace(java.lang.String key, java.lang.Object... varargs)
CommonsLogMsg.trace(Log, Msg.BundleBaseName, Locale, String, Object[])
to log the message.
trace
in class Logger
key
- the resource bundle key of the message to logvarargs
- the resource bundle message arguments
Logger.trace(String, Object[])
protected void createLogObject(java.lang.Class clazz)
createLogObject
in class Logger
clazz
- the class to associate with the log object that is to be createdLogger.createLogObject(Class)
protected void createLogObject(java.lang.String name)
createLogObject
in class Logger
name
- the name to associate with the log object that is to be createdLogger.createLogObject(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |