public class LogWrapper extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
debug(String msg)
Logs a message with the debug log level.
|
void |
debug(String throwable,
Throwable msg)
Logs a message with the debug log level and logs the stacktrace of the exception causing the error.
|
void |
debug(Supplier<String> msgSupplier)
Logs a message with the debug log level.
|
void |
debug(Throwable throwable,
Supplier<String> msgSupplier)
Logs a message with the debug log level and logs the stacktrace of the exception causing the error.
|
void |
error(String msg)
Logs a message with the error log level.
|
void |
error(String throwable,
Throwable msg)
Logs a message with the error log level and logs the stacktrace of the exception causing the error.
|
void |
error(Supplier<String> msgSupplier)
Logs a message with the error log level.
|
void |
error(Throwable throwable,
Supplier<String> msgSupplier)
Logs a message with the error log level and logs the stacktrace of the exception causing the error.
|
static LogWrapper |
getInstance(org.slf4j.Logger logger)
Returns an instance of
LogWrapper which can be used for logging. |
static LogWrapper |
getInstance(Object source)
Returns an instance of
LogWrapper which can be used for logging. |
void |
info(String msg)
Logs a message with the info log level.
|
void |
info(String throwable,
Throwable msg)
Logs a message with the info log level and logs the stacktrace of the exception causing the error.
|
void |
info(Supplier<String> msgSupplier)
Logs a message with the info log level.
|
void |
info(Throwable throwable,
Supplier<String> msgSupplier)
Logs a message with the info log level and logs the stacktrace of the exception causing the error.
|
void |
log(LogLevels uLevel,
String msg)
Logs a message with the given log level.
|
void |
log(LogLevels uLevel,
String msg,
Throwable throwable)
Logs a message with the given log level and logs the stack trace of the throwable exception.
|
void |
log(LogLevels uLevel,
Supplier<String> msgSupplier)
Logs a message with the given log level.
|
void |
log(LogLevels uLevel,
Supplier<String> msgSupplier,
Throwable throwable)
Logs a message with the given log level and logs the stack trace of the throwable exception.
|
void |
trace(String msg)
Logs a message with the trace log level.
|
void |
trace(String throwable,
Throwable msg)
Logs a message with the trace log level and logs the stacktrace of the exception causing the error.
|
void |
trace(Supplier<String> msgSupplier)
Logs a message with the trace log level.
|
void |
trace(Throwable throwable,
Supplier<String> msgSupplier)
Logs a message with the trace log level and logs the stacktrace of the exception causing the error.
|
void |
warn(String msg)
Logs a message with the warn log level.
|
void |
warn(String msg,
Throwable throwable)
Logs a message with the warn log level and logs the stacktrace of the exception causing the error.
|
void |
warn(Supplier<String> msgSupplier)
Logs a message with the warn log level.
|
void |
warn(Throwable throwable,
Supplier<String> msgSupplier)
Logs a message with the warn log level and logs the stacktrace of the exception causing the error.
|
public static LogWrapper getInstance(Object source)
LogWrapper which can be used for logging.source - the name of the logger sourceLogWrapper which can be used for loggingpublic static LogWrapper getInstance(org.slf4j.Logger logger)
LogWrapper which can be used for logging.logger - the Logger which should be wrapped by the LogWrapperLogWrapper which can be used for loggingpublic void log(LogLevels uLevel, Supplier<String> msgSupplier)
uLevel - the log level of the messagemsgSupplier - the Supplier of the log messagepublic void log(LogLevels uLevel, String msg)
uLevel - the log level of the messagemsg - the the log messagepublic void log(LogLevels uLevel, Supplier<String> msgSupplier, Throwable throwable)
uLevel - the log level of the messagemsgSupplier - the Supplier of the log messagethrowable - the throwable exception causing the logpublic void log(LogLevels uLevel, String msg, Throwable throwable)
uLevel - the log level of the messagemsg - the message to be loggedthrowable - the throwable exception causing the logpublic void error(Supplier<String> msgSupplier)
msgSupplier - the Supplier of the log messagepublic void error(String msg)
msg - the message to be loggedpublic void error(Throwable throwable, Supplier<String> msgSupplier)
throwable - the throwable exception causing the logmsgSupplier - the Supplier of the log messagepublic void error(String throwable, Throwable msg)
throwable - the throwable exception causing the logmsg - the message to be loggedpublic void warn(Supplier<String> msgSupplier)
msgSupplier - the Supplier of the log messagepublic void warn(String msg)
msg - the message to be loggedpublic void warn(Throwable throwable, Supplier<String> msgSupplier)
throwable - the throwable exception causing the logmsgSupplier - the Supplier of the log messagepublic void warn(String msg, Throwable throwable)
msg - the message to be loggedthrowable - the throwable exception causing the logpublic void info(Supplier<String> msgSupplier)
msgSupplier - the Supplier of the log messagepublic void info(String msg)
msg - the message to be loggedpublic void info(Throwable throwable, Supplier<String> msgSupplier)
throwable - the throwable exception causing the logmsgSupplier - the Supplier of the log messagepublic void info(String throwable, Throwable msg)
throwable - the throwable exception causing the logmsg - the message to be loggedpublic void debug(Supplier<String> msgSupplier)
msgSupplier - the Supplier of the log messagepublic void debug(String msg)
msg - the message to be loggedpublic void debug(Throwable throwable, Supplier<String> msgSupplier)
throwable - the throwable exception causing the logmsgSupplier - the Supplier of the log messagepublic void debug(String throwable, Throwable msg)
throwable - the throwable exception causing the logmsg - the message to be loggedpublic void trace(Supplier<String> msgSupplier)
msgSupplier - the Supplier of the log messagepublic void trace(String msg)
msg - the message to be loggedpublic void trace(Throwable throwable, Supplier<String> msgSupplier)
throwable - the throwable exception causing the logmsgSupplier - the Supplier of the log messageCopyright © 2016 SAP. All Rights Reserved.