|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mazz.i18n.Logger mazz.i18n.log4j.Log4jLogger
public class Log4jLogger
Similar in functionality to the Log4jLogMsg
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 | |
---|---|
Log4jLogger(java.lang.Class clazz)
|
|
Log4jLogger(java.lang.Class clazz,
java.util.Locale locale)
|
|
Log4jLogger(java.lang.Class clazz,
Msg.BundleBaseName basename)
|
|
Log4jLogger(java.lang.Class clazz,
Msg.BundleBaseName basename,
java.util.Locale locale)
|
|
Log4jLogger(java.lang.String name)
|
|
Log4jLogger(java.lang.String name,
java.util.Locale locale)
|
|
Log4jLogger(java.lang.String name,
Msg.BundleBaseName basename)
|
|
Log4jLogger(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 Log4jLogMsg.debug(org.apache.log4j.Logger, Msg.BundleBaseName, Locale, String, Object[]) to log
the message. |
Msg |
debug(java.lang.Throwable throwable,
java.lang.String key,
java.lang.Object... varargs)
Calls Log4jLogMsg.debug(org.apache.log4j.Logger, Throwable, Msg.BundleBaseName, Locale, String, Object[])
to log the message. |
Msg |
error(java.lang.String key,
java.lang.Object... varargs)
Calls Log4jLogMsg.error(org.apache.log4j.Logger, Msg.BundleBaseName, Locale, String, Object[]) to log
the message. |
Msg |
error(java.lang.Throwable throwable,
java.lang.String key,
java.lang.Object... varargs)
Calls Log4jLogMsg.error(org.apache.log4j.Logger, Throwable, Msg.BundleBaseName, Locale, String, Object[])
to log the message. |
Msg |
fatal(java.lang.String key,
java.lang.Object... varargs)
Calls Log4jLogMsg.fatal(org.apache.log4j.Logger, Msg.BundleBaseName, Locale, String, Object[]) to log
the message. |
Msg |
fatal(java.lang.Throwable throwable,
java.lang.String key,
java.lang.Object... varargs)
Calls Log4jLogMsg.fatal(org.apache.log4j.Logger, Throwable, Msg.BundleBaseName, Locale, String, Object[])
to log the message. |
Msg |
info(java.lang.String key,
java.lang.Object... varargs)
Calls Log4jLogMsg.info(org.apache.log4j.Logger, Msg.BundleBaseName, Locale, String, Object[]) to log
the message. |
Msg |
info(java.lang.Throwable throwable,
java.lang.String key,
java.lang.Object... varargs)
Calls Log4jLogMsg.info(org.apache.log4j.Logger, Throwable, Msg.BundleBaseName, Locale, String, Object[]) to
log the message. |
boolean |
isDebugEnabled()
Returns true if the debug log level is enabled |
boolean |
isErrorEnabled()
Log4J's design philosophy is that this method should never be needed. |
boolean |
isFatalEnabled()
Log4J's design philosophy is that this method should never be needed. |
boolean |
isInfoEnabled()
Returns true if the info log level is enabled |
boolean |
isTraceEnabled()
Returns true if the trace log level is enabled |
boolean |
isWarnEnabled()
Log4J's design philosophy is that this method should never be needed. |
Msg |
trace(java.lang.String key,
java.lang.Object... varargs)
Calls Log4jLogMsg.trace(org.apache.log4j.Logger, Msg.BundleBaseName, Locale, String, Object[]) to log
the message. |
Msg |
trace(java.lang.Throwable throwable,
java.lang.String key,
java.lang.Object... varargs)
Calls Log4jLogMsg.trace(org.apache.log4j.Logger, Throwable, Msg.BundleBaseName, Locale, String, Object[])
to log the message. |
Msg |
warn(java.lang.String key,
java.lang.Object... varargs)
Calls Log4jLogMsg.warn(org.apache.log4j.Logger, Msg.BundleBaseName, Locale, String, Object[]) to log
the message. |
Msg |
warn(java.lang.Throwable throwable,
java.lang.String key,
java.lang.Object... varargs)
Calls Log4jLogMsg.warn(org.apache.log4j.Logger, 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 Log4jLogger(java.lang.String name, Msg.BundleBaseName basename, java.util.Locale locale)
Logger.Logger(String, Msg.BundleBaseName, Locale)
public Log4jLogger(java.lang.Class clazz, Msg.BundleBaseName basename, java.util.Locale locale)
Logger.Logger(Class, Msg.BundleBaseName, Locale)
public Log4jLogger(java.lang.String name, Msg.BundleBaseName basename)
Logger.Logger(String, Msg.BundleBaseName)
public Log4jLogger(java.lang.Class clazz, Msg.BundleBaseName basename)
Logger.Logger(Class, Msg.BundleBaseName)
public Log4jLogger(java.lang.String name, java.util.Locale locale)
Logger.Logger(String, Locale)
public Log4jLogger(java.lang.Class clazz, java.util.Locale locale)
Logger.Logger(Class, Locale)
public Log4jLogger(java.lang.String name)
Logger.Logger(String)
public Log4jLogger(java.lang.Class clazz)
Logger.Logger(Class)
Method Detail |
---|
public boolean isFatalEnabled()
true
.
isFatalEnabled
in class Logger
Logger.isFatalEnabled()
public boolean isErrorEnabled()
true
.
isErrorEnabled
in class Logger
Logger.isErrorEnabled()
public boolean isWarnEnabled()
true
.
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)
Log4jLogMsg.fatal(org.apache.log4j.Logger, 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)
Log4jLogMsg.fatal(org.apache.log4j.Logger, 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)
Log4jLogMsg.error(org.apache.log4j.Logger, 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)
Log4jLogMsg.error(org.apache.log4j.Logger, 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)
Log4jLogMsg.warn(org.apache.log4j.Logger, 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)
Log4jLogMsg.warn(org.apache.log4j.Logger, 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)
Log4jLogMsg.info(org.apache.log4j.Logger, 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)
Log4jLogMsg.info(org.apache.log4j.Logger, 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)
Log4jLogMsg.debug(org.apache.log4j.Logger, 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)
Log4jLogMsg.debug(org.apache.log4j.Logger, 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)
Log4jLogMsg.trace(org.apache.log4j.Logger, 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)
Log4jLogMsg.trace(org.apache.log4j.Logger, 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 |