public class Slf4jProxy extends Object implements Slf4jProxyInterface
slf4j implementation using reflection.| Constructor and Description |
|---|
Slf4jProxy()
Construct an
Slf4jProxy. |
| Modifier and Type | Method and Description |
|---|---|
void |
debug(Object slf4jLogger,
String text)
Output a debug message.
|
void |
error(Object slf4jLogger,
String text)
Output an error message.
|
void |
error(Object slf4jLogger,
String text,
Throwable throwable)
Output an error message along with a
Throwable. |
Object |
getLogger(String name)
Get a
Logger object with the specified name. |
void |
info(Object slf4jLogger,
String text)
Output an info message.
|
boolean |
isDebugEnabled(Object slf4jLogger)
Test whether debug output is enabled for this
Logger. |
boolean |
isEnabled(Object slf4jLogger,
net.pwall.log.Level level)
Test whether a specified level is enabled for this
Logger. |
boolean |
isErrorEnabled(Object slf4jLogger)
Test whether error output is enabled for this
Logger. |
boolean |
isInfoEnabled(Object slf4jLogger)
Test whether info output is enabled for this
Logger. |
boolean |
isTraceEnabled(Object slf4jLogger)
Test whether trace output is enabled for this
Logger. |
boolean |
isWarnEnabled(Object slf4jLogger)
Test whether warning output is enabled for this
Logger. |
void |
log(Object slf4jLogger,
net.pwall.log.Level level,
String text)
Output a message at the specified level.
|
void |
trace(Object slf4jLogger,
String text)
Output a trace message.
|
void |
warn(Object slf4jLogger,
String text)
Output a warning message.
|
public Slf4jProxy()
throws ClassNotFoundException,
NoSuchMethodException
Slf4jProxy. Only one such object will be required.ClassNotFoundException - if the slf4j classes are not foundNoSuchMethodException - if the required methods are not foundpublic Object getLogger(String name) throws InvocationTargetException, IllegalAccessException
Logger object with the specified name.getLogger in interface Slf4jProxyInterfacename - the nameLoggerInvocationTargetException - if thrown by underlying systemIllegalAccessException - if thrown by underlying systempublic boolean isTraceEnabled(Object slf4jLogger)
Logger.isTraceEnabled in interface Slf4jProxyInterfaceslf4jLogger - the Loggertrue if trace output is enabledpublic boolean isDebugEnabled(Object slf4jLogger)
Logger.isDebugEnabled in interface Slf4jProxyInterfaceslf4jLogger - the Loggertrue if debug output is enabledpublic boolean isInfoEnabled(Object slf4jLogger)
Logger.isInfoEnabled in interface Slf4jProxyInterfaceslf4jLogger - the Loggertrue if info output is enabledpublic boolean isWarnEnabled(Object slf4jLogger)
Logger.isWarnEnabled in interface Slf4jProxyInterfaceslf4jLogger - the Loggertrue if warning output is enabledpublic boolean isErrorEnabled(Object slf4jLogger)
Logger.isErrorEnabled in interface Slf4jProxyInterfaceslf4jLogger - the Loggertrue if error output is enabledpublic boolean isEnabled(Object slf4jLogger, net.pwall.log.Level level)
Logger.isEnabled in interface Slf4jProxyInterfaceslf4jLogger - the Loggerlevel - the Leveltrue if error output is enabledpublic void trace(Object slf4jLogger, String text)
trace in interface Slf4jProxyInterfaceslf4jLogger - the Loggertext - the messagepublic void debug(Object slf4jLogger, String text)
debug in interface Slf4jProxyInterfaceslf4jLogger - the Loggertext - the messagepublic void info(Object slf4jLogger, String text)
info in interface Slf4jProxyInterfaceslf4jLogger - the Loggertext - the messagepublic void warn(Object slf4jLogger, String text)
warn in interface Slf4jProxyInterfaceslf4jLogger - the Loggertext - the messagepublic void error(Object slf4jLogger, String text)
error in interface Slf4jProxyInterfaceslf4jLogger - the Loggertext - the messagepublic void error(Object slf4jLogger, String text, Throwable throwable)
Throwable.error in interface Slf4jProxyInterfaceslf4jLogger - the Loggertext - the messagethrowable - the Throwablepublic void log(Object slf4jLogger, net.pwall.log.Level level, String text)
log in interface Slf4jProxyInterfaceslf4jLogger - the Loggerlevel - the Leveltext - the messageCopyright © 2024. All rights reserved.