@ThreadSafe @ParametersAreNullableByDefault public final class Log extends Object
Logger instances.
It also provides static methods for logging without declaring a specific instance. In this case, the root logger is used by default.
| Modifier and Type | Method and Description |
|---|---|
static void |
debug(CharSequence message)
Logs a message at the
DEBUG level, using the root logger. |
static void |
debug(CharSequence message,
Object... params)
Logs a message with parameters at the
DEBUG level, using the root logger. |
static void |
debug(Object obj)
Logs an object at the
DEBUG level, using the root logger. |
static void |
debug(Throwable e)
|
static void |
debug(Throwable e,
CharSequence message)
|
static void |
debug(Throwable e,
CharSequence message,
Object... params)
|
static void |
error(CharSequence message)
Logs a message at the
ERROR level, using the root logger. |
static void |
error(CharSequence message,
Object... params)
Logs a message with parameters at the
ERROR level, using the root logger. |
static void |
error(Object obj)
Logs an object at the
ERROR level, using the root logger. |
static void |
error(Throwable e)
|
static void |
error(Throwable e,
CharSequence message)
|
static void |
error(Throwable e,
CharSequence message,
Object... params)
|
static Logger |
forName(String name)
Returns a
Logger with the specified name. |
static void |
info(CharSequence message)
Logs a message at the
INFO level, using the root logger. |
static void |
info(CharSequence message,
Object... params)
Logs a message with parameters at the
INFO level, using the root logger. |
static void |
info(Object obj)
Logs an object at the
INFO level, using the root logger. |
static void |
info(Throwable e)
|
static void |
info(Throwable e,
CharSequence message)
|
static void |
info(Throwable e,
CharSequence message,
Object... params)
|
static void |
log(Level level,
CharSequence message)
Logs a message at the given
level, using the root logger. |
static void |
log(Level level,
CharSequence message,
Object... params)
Logs a message with parameters at the given
level, using the root logger. |
static void |
log(Level level,
Object obj)
Logs an object at the given
level, using the root logger. |
static void |
log(Level level,
Throwable e)
Logs the stack trace of the given
Throwable at the given level, using the root logger. |
static void |
log(Level level,
Throwable e,
CharSequence message)
Logs a message at the given
level including the stack trace of the given Throwable, using the
root logger. |
static void |
log(Level level,
Throwable e,
CharSequence message,
Object... params)
Logs a message with parameters at the given
level including the stack trace of the given Throwable, using the root logger. |
static Logger |
root()
Returns the root
Logger. |
static void |
trace(CharSequence message)
Logs a message at the
TRACE level, using the root logger. |
static void |
trace(CharSequence message,
Object... params)
Logs a message with parameters at the
TRACE level, using the root logger. |
static void |
trace(Object obj)
Logs an object at the
TRACE level, using the root logger. |
static void |
trace(Throwable e)
|
static void |
trace(Throwable e,
CharSequence message)
|
static void |
trace(Throwable e,
CharSequence message,
Object... params)
|
static void |
warn(CharSequence message)
Logs a message at the
WARN level, using the root logger. |
static void |
warn(CharSequence message,
Object... params)
Logs a message with parameters at the
WARN level, using the root logger. |
static void |
warn(Object obj)
Logs an object at the
WARN level, using the root logger. |
static void |
warn(Throwable e)
|
static void |
warn(Throwable e,
CharSequence message)
|
static void |
warn(Throwable e,
CharSequence message,
Object... params)
|
@Nonnull public static Logger root()
Logger.LoggerforName(String)@Nonnull public static Logger forName(@Nonnull String name)
Logger with the specified name.name - the logger nameLoggerpublic static void trace(Object obj)
TRACE level, using the root logger.obj - the object to logroot(),
Logger.trace(Object)public static void trace(CharSequence message)
TRACE level, using the root logger.message - the message to logroot(),
Logger.trace(CharSequence)public static void trace(CharSequence message, Object... params)
TRACE level, using the root logger.message - the message to log; the format depends on the MessageFormatparams - parameters to the messageroot(),
Logger.trace(CharSequence, Object...)public static void trace(Throwable e)
e - the exception to log, including its stack traceroot(),
Logger.trace(Throwable)public static void trace(Throwable e, CharSequence message)
TRACE level including the stack trace of the given Throwable,
using the root logger.e - the exception to log, including its stack tracemessage - the message to logroot(),
Logger.trace(Throwable, CharSequence)public static void trace(Throwable e, CharSequence message, Object... params)
TRACE level including the stack trace of the given
Throwable, using the root logger.e - the exception to log, including its stack tracemessage - the message to log; the format depends on the MessageFormatparams - parameters to the messageroot(),
Logger.trace(Throwable, CharSequence, Object...)public static void debug(Object obj)
DEBUG level, using the root logger.obj - the object to logroot(),
Logger.debug(Object)public static void debug(CharSequence message)
DEBUG level, using the root logger.message - the message to logroot(),
Logger.debug(CharSequence)public static void debug(CharSequence message, Object... params)
DEBUG level, using the root logger.message - the message to log; the format depends on the MessageFormatparams - parameters to the messageroot(),
Logger.debug(CharSequence, Object...)public static void debug(Throwable e)
e - the exception to log, including its stack traceroot(),
Logger.debug(Throwable)public static void debug(Throwable e, CharSequence message)
DEBUG level including the stack trace of the given Throwable,
using the root logger.e - the exception to log, including its stack tracemessage - the message to logroot(),
Logger.debug(Throwable, CharSequence)public static void debug(Throwable e, CharSequence message, Object... params)
DEBUG level including the stack trace of the given
Throwable, using the root logger.e - the exception to log, including its stack tracemessage - the message to log; the format depends on the MessageFormatparams - parameters to the messageroot(),
Logger.debug(Throwable, CharSequence, Object...)public static void info(Object obj)
INFO level, using the root logger.obj - the object to logroot(),
Logger.info(Object)public static void info(CharSequence message)
INFO level, using the root logger.message - the message to logroot(),
Logger.info(CharSequence)public static void info(CharSequence message, Object... params)
INFO level, using the root logger.message - the message to log; the format depends on the MessageFormatparams - parameters to the messageroot(),
Logger.info(CharSequence, Object...)public static void info(Throwable e)
e - the exception to log, including its stack traceroot(),
Logger.info(Throwable)public static void info(Throwable e, CharSequence message)
INFO level including the stack trace of the given Throwable,
using the root logger.e - the exception to log, including its stack tracemessage - the message to logroot(),
Logger.info(Throwable, CharSequence)public static void info(Throwable e, CharSequence message, Object... params)
INFO level including the stack trace of the given Throwable, using the root logger.e - the exception to log, including its stack tracemessage - the message to log; the format depends on the MessageFormatparams - parameters to the messageroot(),
Logger.info(Throwable, CharSequence, Object...)public static void warn(Object obj)
WARN level, using the root logger.obj - the object to logroot(),
Logger.warn(Object)public static void warn(CharSequence message)
WARN level, using the root logger.message - the message to logroot(),
Logger.warn(CharSequence)public static void warn(CharSequence message, Object... params)
WARN level, using the root logger.message - the message to log; the format depends on the MessageFormatparams - parameters to the messageroot(),
Logger.warn(CharSequence, Object...)public static void warn(Throwable e)
e - the exception to log, including its stack traceroot(),
Logger.warn(Throwable)public static void warn(Throwable e, CharSequence message)
WARN level including the stack trace of the given Throwable,
using the root logger.e - the exception to log, including its stack tracemessage - the message to logroot(),
Logger.warn(Throwable, CharSequence)public static void warn(Throwable e, CharSequence message, Object... params)
WARN level including the stack trace of the given Throwable, using the root logger.e - the exception to log, including its stack tracemessage - the message to log; the format depends on the MessageFormatparams - parameters to the messageroot(),
Logger.warn(Throwable, CharSequence, Object...)public static void error(Object obj)
ERROR level, using the root logger.obj - the object to logroot(),
Logger.error(Object)public static void error(CharSequence message)
ERROR level, using the root logger.message - the message to logroot(),
Logger.error(CharSequence)public static void error(CharSequence message, Object... params)
ERROR level, using the root logger.message - the message to log; the format depends on the MessageFormatparams - parameters to the messageroot(),
Logger.error(CharSequence, Object...)public static void error(Throwable e)
e - the exception to log, including its stack traceroot(),
Logger.error(Throwable)public static void error(Throwable e, CharSequence message)
ERROR level including the stack trace of the given Throwable,
using the root logger.e - the exception to log, including its stack tracemessage - the message to logroot(),
Logger.error(Throwable, CharSequence)public static void error(Throwable e, CharSequence message, Object... params)
ERROR level including the stack trace of the given
Throwable, using the root logger.e - the exception to log, including its stack tracemessage - the message to log; the format depends on the MessageFormatparams - parameters to the messageroot(),
Logger.error(Throwable, CharSequence, Object...)public static void log(@Nonnull Level level, Object obj)
level, using the root logger.level - the logging levelobj - the object to logroot(),
Logger.log(Level, Object)public static void log(@Nonnull Level level, CharSequence message)
level, using the root logger.level - the logging levelmessage - the message to logroot(),
Logger.log(Level, CharSequence)public static void log(@Nonnull Level level, CharSequence message, Object... params)
level, using the root logger.level - the logging levelmessage - the message to log; the format depends on the MessageFormatparams - parameters to the messageroot(),
Logger.log(Level, CharSequence, Object...)public static void log(@Nonnull Level level, Throwable e)
Throwable at the given level, using the root logger.level - the logging levele - the exception to log, including its stack traceroot(),
Logger.log(Level, Throwable)public static void log(@Nonnull Level level, Throwable e, CharSequence message)
level including the stack trace of the given Throwable, using the
root logger.level - the logging levele - the exception to log, including its stack tracemessage - the message to logroot(),
Logger.log(Level, Throwable, CharSequence)public static void log(@Nonnull Level level, Throwable e, CharSequence message, Object... params)
level including the stack trace of the given Throwable, using the root logger.level - the logging levele - the exception to log, including its stack tracemessage - the message to log; the format depends on the MessageFormatparams - parameters to the messageroot(),
Logger.log(Level, Throwable, CharSequence, Object...)Copyright © 2017–2019 Atlanmod. All rights reserved.