public final class DfLogger
extends java.lang.Object
Constructor and Description |
---|
DfLogger() |
Modifier and Type | Method and Description |
---|---|
static void |
debug(java.lang.Object source,
java.lang.String message,
java.lang.Object[] params,
java.lang.Throwable t)
Logs a localized and parameterized message with the
Level.DEBUG logging level. |
static void |
debug(java.lang.Object source,
java.lang.String message,
java.lang.String[] params,
java.lang.Throwable t)
Logs a localized and parameterized message with the
Level.DEBUG logging level. |
static void |
error(java.lang.Object source,
java.lang.String message,
java.lang.Object[] params,
java.lang.Throwable t)
Logs a localized and parameterized message with the
Level.ERROR logging level. |
static void |
error(java.lang.Object source,
java.lang.String message,
java.lang.String[] params,
java.lang.Throwable t)
Logs a localized and parameterized message with the
Level.ERROR logging level. |
static void |
fatal(java.lang.Object source,
java.lang.String message,
java.lang.Object[] params,
java.lang.Throwable t)
Logs a localized and parameterized message with the
Level.FATAL logging level. |
static void |
fatal(java.lang.Object source,
java.lang.String message,
java.lang.String[] params,
java.lang.Throwable t)
Logs a localized and parameterized message with the
Level.FATAL logging level. |
static java.lang.String |
getFullMessage(java.lang.String message,
java.lang.Object[] params) |
static java.lang.String |
getFullMessage(java.lang.String message,
java.lang.String[] params) |
static org.apache.logging.log4j.Logger |
getLogger(java.lang.Object source)
Returns a logger named according to the value of the source parameter.
|
static org.apache.logging.log4j.Logger |
getRootLogger()
Returns the root logger
|
static void |
info(java.lang.Object source,
java.lang.String message,
java.lang.Object[] params,
java.lang.Throwable t)
Logs a localized and parameterized message with the
Level.INFO logging level. |
static void |
info(java.lang.Object source,
java.lang.String message,
java.lang.String[] params,
java.lang.Throwable t)
Logs a localized and parameterized message with the
Level.INFO logging level. |
static boolean |
isDebugEnabled(java.lang.Object source)
Indicates whether the
Level.DEBUG logging level is currently enabled. |
static boolean |
isErrorEnabled(java.lang.Object source)
Indicates whether the
Level.ERROR logging level is currently enabled. |
static boolean |
isFatalEnabled(java.lang.Object source)
Indicates whether the
Level.FATAL logging level is currently enabled. |
static boolean |
isInfoEnabled(java.lang.Object source)
Indicates whether the
Level.INFO logging level is currently enabled. |
static boolean |
isTraceEnabled(java.lang.Object source)
Indicates whether tracing is currently enabled.
|
static boolean |
isWarnEnabled(java.lang.Object source)
Indicates whether the
Level.WARN logging level is currently enabled. |
static void |
mute(boolean fMode)
Mute or unmute logging for the given thread
|
static void |
registerResourceBundle(java.util.ResourceBundle bundle)
Registers a resource bundle containing localized log message test.
|
static void |
restoreClientContext() |
static void |
setClientContext(java.lang.String prefix) |
static void |
trace(java.lang.Object source,
java.lang.String message,
java.lang.Object[] params,
java.lang.Throwable t)
Logs a localized and parameterized trace message with the
Level.DEBUG logging level. |
static void |
trace(java.lang.Object source,
java.lang.String message,
java.lang.String[] params,
java.lang.Throwable t)
Logs a localized and parameterized trace message with the
Level.DEBUG logging level. |
static void |
warn(java.lang.Object source,
java.lang.String message,
java.lang.Object[] params,
java.lang.Throwable t)
Logs a localized and parameterized message with the
Level.WARN logging level. |
static void |
warn(java.lang.Object source,
java.lang.String message,
java.lang.String[] params,
java.lang.Throwable t)
Logs a localized and parameterized message with the
Level.WARN logging level. |
public static void fatal(java.lang.Object source, java.lang.String message, java.lang.Object[] params, java.lang.Throwable t)
Level.FATAL
logging level.
First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next,
the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
with the user supplied object parameters.source
- the logger identifiermessage
- the message or identifier of a message to logparams
- parameters to use when formating messaget
- a throwable to log, may be null.public static void fatal(java.lang.Object source, java.lang.String message, java.lang.String[] params, java.lang.Throwable t)
Level.FATAL
logging level.
First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next,
the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
with the user supplied object parameters.source
- the logger identifiermessage
- the message or identifier of a message to logparams
- parameters to use when formating messaget
- a throwable to log, may be null.public static void error(java.lang.Object source, java.lang.String message, java.lang.Object[] params, java.lang.Throwable t)
Level.ERROR
logging level.
First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next,
the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
with the user supplied object parameters.source
- the logger identifiermessage
- the message or identifier of a message to logparams
- parameters to use when formating messaget
- a throwable to log, may be null.public static void error(java.lang.Object source, java.lang.String message, java.lang.String[] params, java.lang.Throwable t)
Level.ERROR
logging level.
First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next,
the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
with the user supplied object parameters.source
- the logger identifiermessage
- the message or identifier of a message to logparams
- parameters to use when formating messaget
- a throwable to log, may be null.public static void warn(java.lang.Object source, java.lang.String message, java.lang.Object[] params, java.lang.Throwable t)
Level.WARN
logging level.
First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next,
the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
with the user supplied object parameters.source
- the logger identifiermessage
- the message or identifier of a message to logparams
- parameters to use when formating messaget
- a throwable to log, may be null.public static void warn(java.lang.Object source, java.lang.String message, java.lang.String[] params, java.lang.Throwable t)
Level.WARN
logging level.
First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next,
the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
with the user supplied object parameters.source
- the logger identifiermessage
- the message or identifier of a message to logparams
- parameters to use when formating messaget
- a throwable to log, may be null.public static void info(java.lang.Object source, java.lang.String message, java.lang.Object[] params, java.lang.Throwable t)
Level.INFO
logging level.
First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next,
the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
with the user supplied object parameters.source
- the logger identifiermessage
- the message or identifier of a message to logparams
- parameters to use when formating messaget
- a throwable to log, may be null.public static void info(java.lang.Object source, java.lang.String message, java.lang.String[] params, java.lang.Throwable t)
Level.INFO
logging level.
First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next,
the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
with the user supplied object parameters.source
- the logger identifiermessage
- the message or identifier of a message to logparams
- parameters to use when formating messaget
- a throwable to log, may be null.public static void debug(java.lang.Object source, java.lang.String message, java.lang.Object[] params, java.lang.Throwable t)
Level.DEBUG
logging level.
First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next,
the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
with the user supplied object parameters.source
- the logger identifiermessage
- the message or identifier of a message to logparams
- parameters to use when formating messaget
- a throwable to log, may be null.public static void debug(java.lang.Object source, java.lang.String message, java.lang.String[] params, java.lang.Throwable t)
Level.DEBUG
logging level.
First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next,
the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
with the user supplied object parameters.source
- the logger identifiermessage
- the message or identifier of a message to logparams
- parameters to use when formating messaget
- a throwable to log, may be null.public static void trace(java.lang.Object source, java.lang.String message, java.lang.Object[] params, java.lang.Throwable t)
Level.DEBUG
logging level.
First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next,
the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
with the user supplied object parameters.source
- the logger identifiermessage
- the message or identifier of a message to logparams
- parameters to use when formating messaget
- a throwable to log, may be null.public static void trace(java.lang.Object source, java.lang.String message, java.lang.String[] params, java.lang.Throwable t)
Level.DEBUG
logging level.
First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next,
the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
with the user supplied object parameters.source
- the logger identifiermessage
- the message or identifier of a message to logparams
- parameters to use when formating messaget
- a throwable to log, may be null.public static boolean isFatalEnabled(java.lang.Object source)
Level.FATAL
logging level is currently enabled.
This allows expensive operations such as String concatenation to be avoided when the message will be ignored by
the logger.source
- the logger identifiertrue
if the is level enabledpublic static boolean isErrorEnabled(java.lang.Object source)
Level.ERROR
logging level is currently enabled.
This allows expensive operations such as String concatenation to be avoided when the message will be ignored by
the logger.source
- the logger identifiertrue
if the is level enabledpublic static boolean isWarnEnabled(java.lang.Object source)
Level.WARN
logging level is currently enabled.
This allows expensive operations such as String concatenation to be avoided when the message will be ignored by
the logger.source
- the logger identifiertrue
if the is level enabledpublic static boolean isInfoEnabled(java.lang.Object source)
Level.INFO
logging level is currently enabled.
This allows expensive operations such as String concatenation to be avoided when the message will be ignored by
the logger.source
- the logger identifiertrue
if the is level enabledpublic static boolean isDebugEnabled(java.lang.Object source)
Level.DEBUG
logging level is currently enabled.
This allows expensive operations such as String concatenation to be avoided when the message will be ignored by
the logger.source
- the logger identifiertrue
if the is level enabledpublic static boolean isTraceEnabled(java.lang.Object source)
source
- the logger identifiertrue
if tracing is enabledpublic static org.apache.logging.log4j.Logger getLogger(java.lang.Object source)
source
- the logger identifierpublic static org.apache.logging.log4j.Logger getRootLogger()
public static void setClientContext(java.lang.String prefix)
public static void restoreClientContext()
public static void mute(boolean fMode)
fMode
- true
to mute, false
to unmute.public static void registerResourceBundle(java.util.ResourceBundle bundle)
bundle
- the resource bundlepublic static java.lang.String getFullMessage(java.lang.String message, java.lang.String[] params)
public static java.lang.String getFullMessage(java.lang.String message, java.lang.Object[] params)
Copyright 1994-2023 OpenText Corporation. All rights reserved.