Package org.marketcetera.util.log
Class SLF4JLoggerProxy
- java.lang.Object
-
- org.marketcetera.util.log.SLF4JLoggerProxy
-
public final class SLF4JLoggerProxy extends Object
SLF4J proxy with automatic logger selection and variable number of arguments.- Since:
- 0.5.0
- Version:
- $Id: SLF4JLoggerProxy.java 17760 2018-11-14 14:54:11Z colin $
- Author:
- tlerios@marketcetera.com
-
-
Field Summary
Fields Modifier and Type Field Description private static StringSELF_PROXYThe logging proxy name used when none is explicitly specified.private static org.slf4j.LoggerUNKNOWN_LOGGERThe logger used when no category is explicitly specified.static StringUNKNOWN_LOGGER_NAMEThe name of the category used when no category is explicitly specified.static StringUNKNOWN_MESSAGEThe logging message used when none is explicitly specified.
-
Constructor Summary
Constructors Modifier Constructor Description privateSLF4JLoggerProxy()Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddebug(Object category, String message)Logs the given message under the given logging category at the debugging level.static voiddebug(Object category, String message, Object... params)Logs the given parameterized message under the given logging category at the debugging level.static voiddebug(Object category, String message, Throwable throwable)Logs the given message and throwable under the given logging category at the debugging level.static voiddebug(Object category, Throwable throwable)Logs the given throwable under the given logging category at the debugging level.static voiddebug(Object category, Throwable throwable, String message, Object... params)Logs the given parameterized message and throwable under the given logging category at the debugging level.(package private) static voiddebugProxy(String proxy, Object category, String message)Logs the given message under the given logging category at the debugging level via the given logging proxy.(package private) static voiddebugProxy(String proxy, Object category, String message, Object... params)Logs the given parameterized message under the given logging category at the debugging level via the given logging proxy.(package private) static voiddebugProxy(String proxy, Object category, String message, Throwable throwable)Logs the given message and throwable under the given logging category at the debugging level via the given logging proxy.(package private) static voiddebugProxy(String proxy, Object category, Throwable throwable)Logs the given throwable under the given logging category at the debugging level via the given logging proxy.(package private) static voiddebugProxy(String proxy, Object category, Throwable throwable, String message, Object... params)Logs the given parameterized message and throwable under the given logging category at the debugging level via the given logging proxy.static voiderror(Object category, String message)Logs the given message under the given logging category at the error level.static voiderror(Object category, String message, Object... params)Logs the given parameterized message under the given logging category at the error level.static voiderror(Object category, String message, Throwable throwable)Logs the given message and throwable under the given logging category at the error level.static voiderror(Object category, Throwable throwable)Logs the given throwable under the given logging category at the error level.static voiderror(Object category, Throwable throwable, String message, Object... params)Logs the given parameterized message and throwable under the given logging category at the error level.(package private) static voiderrorProxy(String proxy, Object category, String message)Logs the given message under the given logging category at the error level via the given logging proxy.(package private) static voiderrorProxy(String proxy, Object category, String message, Object... params)Logs the given parameterized message under the given logging category at the error level via the given logging proxy.(package private) static voiderrorProxy(String proxy, Object category, String message, Throwable throwable)Logs the given message and throwable under the given logging category at the error level via the given logging proxy.(package private) static voiderrorProxy(String proxy, Object category, Throwable throwable)Logs the given throwable under the given logging category at the error level via the given logging proxy.(package private) static voiderrorProxy(String proxy, Object category, Throwable throwable, String message, Object... params)Logs the given parameterized message and throwable under the given logging category at the error level via the given logging proxy.private static org.slf4j.LoggergetLogger(Object category)Returns the logger for the given logging category.static voidinfo(Object category, String message)Logs the given message under the given logging category at the informational level.static voidinfo(Object category, String message, Object... params)Logs the given parameterized message under the given logging category at the informational level.static voidinfo(Object category, String message, Throwable throwable)Logs the given message and throwable under the given logging category at the informational level.static voidinfo(Object category, Throwable throwable)Logs the given throwable under the given logging category at the informational level.static voidinfo(Object category, Throwable throwable, String message, Object... params)Logs the given parameterized message and throwable under the given logging category at the informational level.(package private) static voidinfoProxy(String proxy, Object category, String message)Logs the given message under the given logging category at the informational level via the given logging proxy.(package private) static voidinfoProxy(String proxy, Object category, String message, Object... params)Logs the given parameterized message under the given logging category at the informational level via the given logging proxy.(package private) static voidinfoProxy(String proxy, Object category, String message, Throwable throwable)Logs the given message and throwable under the given logging category at the informational level via the given logging proxy.(package private) static voidinfoProxy(String proxy, Object category, Throwable throwable)Logs the given throwable under the given logging category at the informational level via the given logging proxy.(package private) static voidinfoProxy(String proxy, Object category, Throwable throwable, String message, Object... params)Logs the given parameterized message and throwable under the given logging category at the informational level via the given logging proxy.static booleanisDebugEnabled(Object category)Returns true if logging of debugging messages is enabled for the given logging category.static booleanisErrorEnabled(Object category)Returns true if logging of error messages is enabled for the given logging category.static booleanisInfoEnabled(Object category)Returns true if logging of informational messages is enabled for the given logging category.static booleanisTraceEnabled(Object category)Returns true if logging of tracing messages is enabled for the given logging category.static booleanisWarnEnabled(Object category)Returns true if logging of warning messages is enabled for the given logging category.private static booleanlog(org.slf4j.Logger logger, String proxy, int level, String message)Attempts to log the given message using the given logger at the given level and via the given logging proxy.private static booleanlog(org.slf4j.Logger logger, String proxy, int level, String message, Object[] params)Attempts to log the given parameterized message using the given logger at the given level and via the given logging proxy.private static booleanlog(org.slf4j.Logger logger, String proxy, int level, String message, Throwable throwable)Attempts to log the given message and throwable using the given logger at the given level and via the given logging proxy.private static booleanlog(org.slf4j.Logger logger, String proxy, int level, Throwable throwable, String message, Object[] params)Attempts to log the given parameterized message and throwable using the given logger at the given level and via the given logging proxy.static voidtrace(Object category, String message)Logs the given message under the given logging category at the tracing level.static voidtrace(Object category, String message, Object... params)Logs the given parameterized message under the given logging category at the tracing level.static voidtrace(Object category, String message, Throwable throwable)Logs the given message and throwable under the given logging category at the tracing level.static voidtrace(Object category, Throwable throwable)Logs the given throwable under the given logging category at the tracing level.static voidtrace(Object category, Throwable throwable, String message, Object... params)Logs the given parameterized message and throwable under the given logging category at the tracing level.(package private) static voidtraceProxy(String proxy, Object category, String message)Logs the given message under the given logging category at the tracing level via the given logging proxy.(package private) static voidtraceProxy(String proxy, Object category, String message, Object... params)Logs the given parameterized message under the given logging category at the tracing level via the given logging proxy.(package private) static voidtraceProxy(String proxy, Object category, String message, Throwable throwable)Logs the given message and throwable under the given logging category at the tracing level via the given logging proxy.(package private) static voidtraceProxy(String proxy, Object category, Throwable throwable)Logs the given throwable under the given logging category at the tracing level via the given logging proxy.(package private) static voidtraceProxy(String proxy, Object category, Throwable throwable, String message, Object... params)Logs the given parameterized message and throwable under the given logging category at the tracing level via the given logging proxy.static voidwarn(Object category, String message)Logs the given message under the given logging category at the warning level.static voidwarn(Object category, String message, Object... params)Logs the given parameterized message under the given logging category at the warning level.static voidwarn(Object category, String message, Throwable throwable)Logs the given message and throwable under the given logging category at the warning level.static voidwarn(Object category, Throwable throwable)Logs the given throwable under the given logging category at the warning level.static voidwarn(Object category, Throwable throwable, String message, Object... params)Logs the given parameterized message and throwable under the given logging category at the warning level.(package private) static voidwarnProxy(String proxy, Object category, String message)Logs the given message under the given logging category at the warning level via the given logging proxy.(package private) static voidwarnProxy(String proxy, Object category, String message, Object... params)Logs the given parameterized message under the given logging category at the warning level via the given logging proxy.(package private) static voidwarnProxy(String proxy, Object category, String message, Throwable throwable)Logs the given message and throwable under the given logging category at the warning level via the given logging proxy.(package private) static voidwarnProxy(String proxy, Object category, Throwable throwable)Logs the given throwable under the given logging category at the warning level via the given logging proxy.(package private) static voidwarnProxy(String proxy, Object category, Throwable throwable, String message, Object... params)Logs the given parameterized message and throwable under the given logging category at the warning level via the given logging proxy.
-
-
-
Field Detail
-
UNKNOWN_MESSAGE
public static final String UNKNOWN_MESSAGE
The logging message used when none is explicitly specified.- See Also:
- Constant Field Values
-
UNKNOWN_LOGGER_NAME
public static final String UNKNOWN_LOGGER_NAME
The name of the category used when no category is explicitly specified.- See Also:
- Constant Field Values
-
UNKNOWN_LOGGER
private static final org.slf4j.Logger UNKNOWN_LOGGER
The logger used when no category is explicitly specified.
-
SELF_PROXY
private static final String SELF_PROXY
The logging proxy name used when none is explicitly specified.
-
-
Method Detail
-
getLogger
private static org.slf4j.Logger getLogger(Object category)
Returns the logger for the given logging category.- Parameters:
category- The category.- Returns:
- The logger.
-
log
private static boolean log(org.slf4j.Logger logger, String proxy, int level, String message)Attempts to log the given message using the given logger at the given level and via the given logging proxy. Logging takes place only of the logger is location-aware.- Parameters:
logger- The logger.proxy- The proxy.level- The level.message- The message.- Returns:
- True if logging takes place.
-
log
private static boolean log(org.slf4j.Logger logger, String proxy, int level, String message, Throwable throwable)Attempts to log the given message and throwable using the given logger at the given level and via the given logging proxy. Logging takes place only of the logger is location-aware.- Parameters:
logger- The logger.proxy- The proxy.level- The level.message- The message.throwable- The throwable.- Returns:
- True if logging takes place.
-
log
private static boolean log(org.slf4j.Logger logger, String proxy, int level, String message, Object[] params)Attempts to log the given parameterized message using the given logger at the given level and via the given logging proxy. Logging takes place only of the logger is location-aware.- Parameters:
logger- The logger.proxy- The proxy.level- The level.message- The message.params- The message parameters.- Returns:
- True if logging takes place.
-
log
private static boolean log(org.slf4j.Logger logger, String proxy, int level, Throwable throwable, String message, Object[] params)Attempts to log the given parameterized message and throwable using the given logger at the given level and via the given logging proxy. Logging takes place only of the logger is location-aware.- Parameters:
logger- The logger.proxy- The proxy.level- The level.throwable- The throwable.message- The message.params- The message parameters.- Returns:
- True if logging takes place.
-
isErrorEnabled
public static boolean isErrorEnabled(Object category)
Returns true if logging of error messages is enabled for the given logging category.- Parameters:
category- The category.- Returns:
- a
booleanvalue
-
errorProxy
static void errorProxy(String proxy, Object category, String message)
Logs the given message under the given logging category at the error level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.
-
error
public static void error(Object category, String message)
Logs the given message under the given logging category at the error level.- Parameters:
category- The category.message- The message.
-
errorProxy
static void errorProxy(String proxy, Object category, Throwable throwable)
Logs the given throwable under the given logging category at the error level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.throwable- The throwable.
-
error
public static void error(Object category, Throwable throwable)
Logs the given throwable under the given logging category at the error level.- Parameters:
category- The category.throwable- The throwable.
-
errorProxy
static void errorProxy(String proxy, Object category, String message, Throwable throwable)
Logs the given message and throwable under the given logging category at the error level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.throwable- The throwable.
-
error
public static void error(Object category, String message, Throwable throwable)
Logs the given message and throwable under the given logging category at the error level.- Parameters:
category- The category.message- The message.throwable- The throwable.
-
errorProxy
static void errorProxy(String proxy, Object category, String message, Object... params)
Logs the given parameterized message under the given logging category at the error level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.params- The message parameters.
-
error
public static void error(Object category, String message, Object... params)
Logs the given parameterized message under the given logging category at the error level.- Parameters:
category- The category.message- The message.params- The message parameters.
-
errorProxy
static void errorProxy(String proxy, Object category, Throwable throwable, String message, Object... params)
Logs the given parameterized message and throwable under the given logging category at the error level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.throwable- The throwable.message- The message.params- The message parameters.
-
error
public static void error(Object category, Throwable throwable, String message, Object... params)
Logs the given parameterized message and throwable under the given logging category at the error level.- Parameters:
category- The category.throwable- The throwable.message- The message.params- The message parameters.
-
isWarnEnabled
public static boolean isWarnEnabled(Object category)
Returns true if logging of warning messages is enabled for the given logging category.- Parameters:
category- The category.- Returns:
- a
booleanvalue
-
warnProxy
static void warnProxy(String proxy, Object category, String message)
Logs the given message under the given logging category at the warning level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.
-
warn
public static void warn(Object category, String message)
Logs the given message under the given logging category at the warning level.- Parameters:
category- The category.message- The message.
-
warnProxy
static void warnProxy(String proxy, Object category, Throwable throwable)
Logs the given throwable under the given logging category at the warning level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.throwable- The throwable.
-
warn
public static void warn(Object category, Throwable throwable)
Logs the given throwable under the given logging category at the warning level.- Parameters:
category- The category.throwable- The throwable.
-
warnProxy
static void warnProxy(String proxy, Object category, String message, Throwable throwable)
Logs the given message and throwable under the given logging category at the warning level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.throwable- The throwable.
-
warn
public static void warn(Object category, String message, Throwable throwable)
Logs the given message and throwable under the given logging category at the warning level.- Parameters:
category- The category.message- The message.throwable- The throwable.
-
warnProxy
static void warnProxy(String proxy, Object category, String message, Object... params)
Logs the given parameterized message under the given logging category at the warning level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.params- The message parameters.
-
warn
public static void warn(Object category, String message, Object... params)
Logs the given parameterized message under the given logging category at the warning level.- Parameters:
category- The category.message- The message.params- The message parameters.
-
warnProxy
static void warnProxy(String proxy, Object category, Throwable throwable, String message, Object... params)
Logs the given parameterized message and throwable under the given logging category at the warning level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.throwable- The throwable.message- The message.params- The message parameters.
-
warn
public static void warn(Object category, Throwable throwable, String message, Object... params)
Logs the given parameterized message and throwable under the given logging category at the warning level.- Parameters:
category- The category.throwable- The throwable.message- The message.params- The message parameters.
-
isInfoEnabled
public static boolean isInfoEnabled(Object category)
Returns true if logging of informational messages is enabled for the given logging category.- Parameters:
category- The category.- Returns:
- a
booleanvalue
-
infoProxy
static void infoProxy(String proxy, Object category, String message)
Logs the given message under the given logging category at the informational level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.
-
info
public static void info(Object category, String message)
Logs the given message under the given logging category at the informational level.- Parameters:
category- The category.message- The message.
-
infoProxy
static void infoProxy(String proxy, Object category, Throwable throwable)
Logs the given throwable under the given logging category at the informational level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.throwable- The throwable.
-
info
public static void info(Object category, Throwable throwable)
Logs the given throwable under the given logging category at the informational level.- Parameters:
category- The category.throwable- The throwable.
-
infoProxy
static void infoProxy(String proxy, Object category, String message, Throwable throwable)
Logs the given message and throwable under the given logging category at the informational level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.throwable- The throwable.
-
info
public static void info(Object category, String message, Throwable throwable)
Logs the given message and throwable under the given logging category at the informational level.- Parameters:
category- The category.message- The message.throwable- The throwable.
-
infoProxy
static void infoProxy(String proxy, Object category, String message, Object... params)
Logs the given parameterized message under the given logging category at the informational level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.params- The message parameters.
-
info
public static void info(Object category, String message, Object... params)
Logs the given parameterized message under the given logging category at the informational level.- Parameters:
category- The category.message- The message.params- The message parameters.
-
infoProxy
static void infoProxy(String proxy, Object category, Throwable throwable, String message, Object... params)
Logs the given parameterized message and throwable under the given logging category at the informational level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.throwable- The throwable.message- The message.params- The message parameters.
-
info
public static void info(Object category, Throwable throwable, String message, Object... params)
Logs the given parameterized message and throwable under the given logging category at the informational level.- Parameters:
category- The category.throwable- The throwable.message- The message.params- The message parameters.
-
isDebugEnabled
public static boolean isDebugEnabled(Object category)
Returns true if logging of debugging messages is enabled for the given logging category.- Parameters:
category- The category.- Returns:
- a
booleanvalue
-
debugProxy
static void debugProxy(String proxy, Object category, String message)
Logs the given message under the given logging category at the debugging level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.
-
debug
public static void debug(Object category, String message)
Logs the given message under the given logging category at the debugging level.- Parameters:
category- The category.message- The message.
-
debugProxy
static void debugProxy(String proxy, Object category, Throwable throwable)
Logs the given throwable under the given logging category at the debugging level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.throwable- The throwable.
-
debug
public static void debug(Object category, Throwable throwable)
Logs the given throwable under the given logging category at the debugging level.- Parameters:
category- The category.throwable- The throwable.
-
debugProxy
static void debugProxy(String proxy, Object category, String message, Throwable throwable)
Logs the given message and throwable under the given logging category at the debugging level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.throwable- The throwable.
-
debug
public static void debug(Object category, String message, Throwable throwable)
Logs the given message and throwable under the given logging category at the debugging level.- Parameters:
category- The category.message- The message.throwable- The throwable.
-
debugProxy
static void debugProxy(String proxy, Object category, String message, Object... params)
Logs the given parameterized message under the given logging category at the debugging level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.params- The message parameters.
-
debug
public static void debug(Object category, String message, Object... params)
Logs the given parameterized message under the given logging category at the debugging level.- Parameters:
category- The category.message- The message.params- The message parameters.
-
debugProxy
static void debugProxy(String proxy, Object category, Throwable throwable, String message, Object... params)
Logs the given parameterized message and throwable under the given logging category at the debugging level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.throwable- The throwable.message- The message.params- The message parameters.
-
debug
public static void debug(Object category, Throwable throwable, String message, Object... params)
Logs the given parameterized message and throwable under the given logging category at the debugging level.- Parameters:
category- The category.throwable- The throwable.message- The message.params- The message parameters.
-
isTraceEnabled
public static boolean isTraceEnabled(Object category)
Returns true if logging of tracing messages is enabled for the given logging category.- Parameters:
category- The category.- Returns:
- a
booleanvalue
-
traceProxy
static void traceProxy(String proxy, Object category, String message)
Logs the given message under the given logging category at the tracing level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.
-
trace
public static void trace(Object category, String message)
Logs the given message under the given logging category at the tracing level.- Parameters:
category- The category.message- The message.
-
traceProxy
static void traceProxy(String proxy, Object category, Throwable throwable)
Logs the given throwable under the given logging category at the tracing level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.throwable- The throwable.
-
trace
public static void trace(Object category, Throwable throwable)
Logs the given throwable under the given logging category at the tracing level.- Parameters:
category- The category.throwable- The throwable.
-
traceProxy
static void traceProxy(String proxy, Object category, String message, Throwable throwable)
Logs the given message and throwable under the given logging category at the tracing level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.throwable- The throwable.
-
trace
public static void trace(Object category, String message, Throwable throwable)
Logs the given message and throwable under the given logging category at the tracing level.- Parameters:
category- The category.message- The message.throwable- The throwable.
-
traceProxy
static void traceProxy(String proxy, Object category, String message, Object... params)
Logs the given parameterized message under the given logging category at the tracing level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.message- The message.params- The message parameters.
-
trace
public static void trace(Object category, String message, Object... params)
Logs the given parameterized message under the given logging category at the tracing level.- Parameters:
category- The category.message- The message.params- The message parameters.
-
traceProxy
static void traceProxy(String proxy, Object category, Throwable throwable, String message, Object... params)
Logs the given parameterized message and throwable under the given logging category at the tracing level via the given logging proxy.- Parameters:
proxy- The proxy.category- The category.throwable- The throwable.message- The message.params- The message parameters.
-
trace
public static void trace(Object category, Throwable throwable, String message, Object... params)
Logs the given parameterized message and throwable under the given logging category at the tracing level.- Parameters:
category- The category.throwable- The throwable.message- The message.params- The message parameters.
-
-