类 Logger
- 所有已实现的接口:
Serializable
- 直接已知子类:
NoOpLogger
- 作者:
- TODAY
2019-11-03 13:15 - 另请参阅:
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidLogs a message with debug log level.voidLogs an error with debug log level.voidLog a message at the DEBUG level.voidLog a message at the DEBUG level according to the specified format and argument.voidLog a message at the DEBUG level according to the specified format and arguments.voidLog a message at the DEBUG level according to the specified format and arguments.voidLog an exception (throwable) at the DEBUG level with an accompanying message.voidLogs a message with error log level.voidLogs an error with error log level.voidLog a message at the ERROR level.voidLog a message at the ERROR level according to the specified format and argument.voidLog a message at the ERROR level according to the specified format and arguments.voidLog a message at the ERROR level according to the specified format and arguments.voidvoidvoidLog an exception (throwable) at the ERROR level with an accompanying message.abstract StringgetName()Return the name of thisLoggerinstance.voidLogs a message with info log level.voidLogs an error with info log level.voidLog a message at the INFO level.voidLog a message at the INFO level according to the specified format and argument.voidLog a message at the INFO level according to the specified format and arguments.voidLog a message at the INFO level according to the specified format and arguments.voidLog an exception (throwable) at the INFO level with an accompanying message.booleanIs the logger instance enabled for the DEBUG level?abstract booleanIs the logger instance enabled for the ERROR level?abstract booleanIs the logger instance enabled for the INFO level?abstract booleanIs the logger instance enabled for the TRACE level?abstract booleanIs the logger instance enabled for the WARN level?protected abstract voidlogInternal(Level level, Object msg, Throwable t) protected abstract voidlogInternal(Level level, String msg, Throwable t, Object[] args) voidLogs a message with trace log level.voidLogs an error with trace log level.voidLog a message at the TRACE level.voidLog a message at the TRACE level according to the specified format and argument.voidLog a message at the TRACE level according to the specified format and arguments.voidLog a message at the TRACE level according to the specified format and arguments.voidLog an exception (throwable) at the TRACE level with an accompanying message.voidLogs a message with warn log level.voidLogs an error with warn log level.voidLog a message at the WARN level.voidLog a message at the WARN level according to the specified format and argument.voidLog a message at the WARN level according to the specified format and arguments.voidLog a message at the WARN level according to the specified format and arguments.voidLog an exception (throwable) at the WARN level with an accompanying message.
-
字段详细资料
-
FQCN
-
debugEnabled
protected final boolean debugEnabled
-
-
构造器详细资料
-
Logger
protected Logger(boolean debugEnabled)
-
-
方法详细资料
-
getName
Return the name of thisLoggerinstance.- 返回:
- name of this logger instance
-
isTraceEnabled
public abstract boolean isTraceEnabled()Is the logger instance enabled for the TRACE level?- 返回:
- True if this Logger is enabled for the TRACE level, false otherwise.
-
trace
Log a message at the TRACE level.- 参数:
msg- the message string to be logged
-
trace
Log a message at the TRACE level according to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the TRACE level.
- 参数:
format- the format stringarg- the argument
-
trace
Log a message at the TRACE level according to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the TRACE level.
- 参数:
format- the format stringarg1- the first argumentarg2- the second argument
-
trace
Log a message at the TRACE level according to the specified format and arguments.This form avoids superfluous string concatenation when the logger is disabled for the TRACE level. However, this variant incurs the hidden (and relatively small) cost of creating an
Object[]before invoking the method, even if this logger is disabled for TRACE. The variants takingoneandtwoarguments exist solely in order to avoid this hidden cost.- 参数:
format- the format stringarguments- a list of 3 or more arguments
-
trace
Log an exception (throwable) at the TRACE level with an accompanying message.- 参数:
msg- the message accompanying the exceptiont- the exception (throwable) to log
-
isDebugEnabled
public boolean isDebugEnabled()Is the logger instance enabled for the DEBUG level?- 返回:
- True if this Logger is enabled for the DEBUG level, false otherwise.
-
debug
Log a message at the DEBUG level.- 参数:
msg- the message string to be logged
-
debug
Log a message at the DEBUG level according to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the DEBUG level.
- 参数:
format- the format stringarg- the argument
-
debug
Log a message at the DEBUG level according to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the DEBUG level.
- 参数:
format- the format stringarg1- the first argumentarg2- the second argument
-
debug
Log a message at the DEBUG level according to the specified format and arguments.This form avoids superfluous string concatenation when the logger is disabled for the DEBUG level. However, this variant incurs the hidden (and relatively small) cost of creating an
Object[]before invoking the method, even if this logger is disabled for DEBUG. The variants takingoneandtwoarguments exist solely in order to avoid this hidden cost.- 参数:
format- the format stringarguments- a list of 3 or more arguments
-
debug
Log an exception (throwable) at the DEBUG level with an accompanying message.- 参数:
msg- the message accompanying the exceptiont- the exception (throwable) to log
-
isInfoEnabled
public abstract boolean isInfoEnabled()Is the logger instance enabled for the INFO level?- 返回:
- True if this Logger is enabled for the INFO level, false otherwise.
-
info
Log a message at the INFO level.- 参数:
msg- the message string to be logged
-
info
Log a message at the INFO level according to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the INFO level.
- 参数:
format- the format stringarg- the argument
-
info
Log a message at the INFO level according to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the INFO level.
- 参数:
format- the format stringarg1- the first argumentarg2- the second argument
-
info
Log a message at the INFO level according to the specified format and arguments.This form avoids superfluous string concatenation when the logger is disabled for the INFO level. However, this variant incurs the hidden (and relatively small) cost of creating an
Object[]before invoking the method, even if this logger is disabled for INFO. The variants takingoneandtwoarguments exist solely in order to avoid this hidden cost.- 参数:
format- the format stringarguments- a list of 3 or more arguments
-
info
Log an exception (throwable) at the INFO level with an accompanying message.- 参数:
msg- the message accompanying the exceptiont- the exception (throwable) to log
-
isWarnEnabled
public abstract boolean isWarnEnabled()Is the logger instance enabled for the WARN level?- 返回:
- True if this Logger is enabled for the WARN level, false otherwise.
-
warn
Log a message at the WARN level.- 参数:
msg- the message string to be logged
-
warn
Log a message at the WARN level according to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the WARN level.
- 参数:
format- the format stringarg- the argument
-
warn
Log a message at the WARN level according to the specified format and arguments.This form avoids superfluous string concatenation when the logger is disabled for the WARN level. However, this variant incurs the hidden (and relatively small) cost of creating an
Object[]before invoking the method, even if this logger is disabled for WARN. The variants takingoneandtwoarguments exist solely in order to avoid this hidden cost.- 参数:
format- the format stringarguments- a list of 3 or more arguments
-
warn
Log a message at the WARN level according to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the WARN level.
- 参数:
format- the format stringarg1- the first argumentarg2- the second argument
-
warn
Log an exception (throwable) at the WARN level with an accompanying message.- 参数:
msg- the message accompanying the exceptiont- the exception (throwable) to log
-
isErrorEnabled
public abstract boolean isErrorEnabled()Is the logger instance enabled for the ERROR level?- 返回:
- True if this Logger is enabled for the ERROR level, false otherwise.
-
error
Log a message at the ERROR level.- 参数:
msg- the message string to be logged
-
error
Log a message at the ERROR level according to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the ERROR level.
- 参数:
format- the format stringarg- the argument
-
error
-
error
Log a message at the ERROR level according to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the ERROR level.
- 参数:
format- the format stringarg1- the first argumentarg2- the second argument
-
error
-
error
Log a message at the ERROR level according to the specified format and arguments.This form avoids superfluous string concatenation when the logger is disabled for the ERROR level. However, this variant incurs the hidden (and relatively small) cost of creating an
Object[]before invoking the method, even if this logger is disabled for ERROR. The variants takingoneandtwoarguments exist solely in order to avoid this hidden cost.- 参数:
format- the format stringarguments- a list of 3 or more arguments
-
error
Log an exception (throwable) at the ERROR level with an accompanying message.- 参数:
msg- the message accompanying the exceptiont- the exception (throwable) to log
-
error
Logs a message with error log level.- 参数:
message- log this message
-
error
Logs an error with error log level.- 参数:
message- log this messaget- log this cause
-
warn
Logs a message with warn log level.- 参数:
message- log this message
-
warn
Logs an error with warn log level.- 参数:
message- log this messaget- log this cause
-
info
Logs a message with info log level.- 参数:
message- log this message
-
info
Logs an error with info log level.- 参数:
message- log this messaget- log this cause
-
debug
Logs a message with debug log level.- 参数:
message- log this message
-
debug
Logs an error with debug log level.- 参数:
message- log this messaget- log this cause
-
trace
Logs a message with trace log level.- 参数:
message- log this message
-
trace
Logs an error with trace log level.- 参数:
message- log this messaget- log this cause
-
logInternal
-
logInternal
-