Class JdkLogger
- java.lang.Object
-
- org.drasyl.util.logging.JdkLogger
-
- All Implemented Interfaces:
Logger
public class JdkLogger extends Object
java.util.logging logger.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
debug(String msg)
Log a message at the DEBUG level.void
debug(String format, Object arg)
Log a message at the DEBUG level according to the specified format and argument.void
debug(String format, Object... arguments)
Log a message at the DEBUG level according to the specified format and arguments.void
debug(String format, Object arg1, Object arg2)
Log a message at the DEBUG level according to the specified format and arguments.void
debug(String msg, Throwable t)
Log an exception (throwable) at the DEBUG level with an accompanying message.void
debug(String format, Supplier<Object> supplier)
Log a message at the DEBUG level according to the specified format and argument supplier.void
debug(String format, Supplier<Object>... suppliers)
Log a message at the DEBUG level according to the specified format and argument suppliers.void
debug(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
Log a message at the DEBUG level according to the specified format and argument suppliers.void
debug(Throwable t)
Log an exception (throwable) at the DEBUG level.Logger
delegate()
void
error(String msg)
Log a message at the ERROR level.void
error(String format, Object arg)
Log a message at the ERROR level according to the specified format and argument.void
error(String format, Object... arguments)
Log a message at the ERROR level according to the specified format and arguments.void
error(String format, Object arg1, Object arg2)
Log a message at the ERROR level according to the specified format and arguments.void
error(String msg, Throwable t)
Log an exception (throwable) at the ERROR level with an accompanying message.void
error(String format, Supplier<Object> supplier)
Log a message at the ERROR level according to the specified format and argument supplier.void
error(String format, Supplier<Object>... suppliers)
Log a message at the ERROR level according to the specified format and argument suppliers.void
error(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
Log a message at the ERROR level according to the specified format and argument suppliers.void
error(Throwable t)
Log an exception (throwable) at the ERROR level.void
info(String msg)
Log a message at the INFO level.void
info(String format, Object arg)
Log a message at the INFO level according to the specified format and argument.void
info(String format, Object... arguments)
Log a message at the INFO level according to the specified format and arguments.void
info(String format, Object arg1, Object arg2)
Log a message at the INFO level according to the specified format and arguments.void
info(String msg, Throwable t)
Log an exception (throwable) at the INFO level with an accompanying message.void
info(String format, Supplier<Object> supplier)
Log a message at the INFO level according to the specified format and argument supplier.void
info(String format, Supplier<Object>... suppliers)
Log a message at the INFO level according to the specified format and argument suppliers.void
info(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
Log a message at the INFO level according to the specified format and argument suppliers.void
info(Throwable t)
Log an exception (throwable) at the INFO level.boolean
isDebugEnabled()
Is the logger instance enabled for the DEBUG level?boolean
isEnabled(LogLevel level)
Is the logger instance enabled for the specifiedlevel
?boolean
isErrorEnabled()
Is the logger instance enabled for the ERROR level?boolean
isInfoEnabled()
Is the logger instance enabled for the INFO level?boolean
isTraceEnabled()
Is the logger instance enabled for the TRACE level?boolean
isWarnEnabled()
Is the logger instance enabled for the WARN level?void
log(LogLevel level, String msg)
Log a message at the specifiedlevel
level.void
log(LogLevel level, String format, Object arg)
Log a message at the specifiedlevel
level according to the specified format and argument.void
log(LogLevel level, String format, Object... arguments)
Log a message at the specifiedlevel
level according to the specified format and arguments.void
log(LogLevel level, String format, Object arg1, Object arg2)
Log a message at the specifiedlevel
level according to the specified format and arguments.void
log(LogLevel level, String msg, Throwable t)
Log an exception (throwable) at the specifiedlevel
level with an accompanying message.void
log(LogLevel level, String format, Supplier<Object> supplier)
Log a message at the specifiedlevel
level according to the specified format and argument supplier.void
log(LogLevel level, String format, Supplier<Object>... suppliers)
Log a message at the specifiedlevel
level according to the specified format and argument suppliers.void
log(LogLevel level, String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
Log a message at the specifiedlevel
level according to the specified format and argument suppliers.void
log(LogLevel level, Throwable t)
Log an exception (throwable) at the specifiedlevel
level.String
name()
Return the name of thisLogger
instance.void
trace(String msg)
Log a message at the TRACE level.void
trace(String format, Object arg)
Log a message at the TRACE level according to the specified format and argument.void
trace(String format, Object... arguments)
Log a message at the TRACE level according to the specified format and arguments.void
trace(String format, Object arg1, Object arg2)
Log a message at the TRACE level according to the specified format and arguments.void
trace(String msg, Throwable t)
Log an exception (throwable) at the TRACE level with an accompanying message.void
trace(String format, Supplier<Object> supplier)
Log a message at the TRACE level according to the specified format and argument supplier.void
trace(String format, Supplier<Object>... suppliers)
Log a message at the TRACE level according to the specified format and argument suppliers.void
trace(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
Log a message at the TRACE level according to the specified format and argument suppliers.void
trace(Throwable t)
Log an exception (throwable) at the TRACE level.void
warn(String msg)
Log a message at the WARN level.void
warn(String format, Object arg)
Log a message at the WARN level according to the specified format and argument.void
warn(String format, Object... arguments)
Log a message at the WARN level according to the specified format and arguments.void
warn(String format, Object arg1, Object arg2)
Log a message at the WARN level according to the specified format and arguments.void
warn(String msg, Throwable t)
Log an exception (throwable) at the WARN level with an accompanying message.void
warn(String format, Supplier<Object> supplier)
Log a message at the WARN level according to the specified format and argument supplier.void
warn(String format, Supplier<Object>... suppliers)
Log a message at the WARN level according to the specified format and argument suppliers.void
warn(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
Log a message at the WARN level according to the specified format and argument suppliers.void
warn(Throwable t)
Log an exception (throwable) at the WARN level.
-
-
-
Constructor Detail
-
JdkLogger
public JdkLogger(Logger logger)
-
-
Method Detail
-
delegate
public Logger delegate()
-
isTraceEnabled
public boolean isTraceEnabled()
Description copied from interface:Logger
Is the logger instance enabled for the TRACE level?- Returns:
true
if this Logger is enabled for the TRACE level,false
otherwise.
-
trace
public void trace(String msg)
Description copied from interface:Logger
Log a message at the TRACE level.- Parameters:
msg
- the message string to be logged
-
trace
public void trace(String format, Object arg)
Description copied from interface:Logger
Log a message at the TRACE level according to the specified format and argument.- Parameters:
format
- the format stringarg
- the argument
-
trace
public void trace(String format, Object arg1, Object arg2)
Description copied from interface:Logger
Log a message at the TRACE level according to the specified format and arguments.- Parameters:
format
- the format stringarg1
- the first argumentarg2
- the second argument
-
trace
public void trace(String format, Object... arguments)
Description copied from interface:Logger
Log a message at the TRACE level according to the specified format and arguments.- Parameters:
format
- the format stringarguments
- a list of 3 or more arguments
-
trace
public void trace(String msg, Throwable t)
Description copied from interface:Logger
Log an exception (throwable) at the TRACE level with an accompanying message.- Parameters:
msg
- the message accompanying the exceptiont
- the exception (throwable) to log
-
isDebugEnabled
public boolean isDebugEnabled()
Description copied from interface:Logger
Is the logger instance enabled for the DEBUG level?- Returns:
true
if this Logger is enabled for the DEBUG level,false
otherwise.
-
debug
public void debug(String msg)
Description copied from interface:Logger
Log a message at the DEBUG level.- Parameters:
msg
- the message string to be logged
-
debug
public void debug(String format, Object arg)
Description copied from interface:Logger
Log a message at the DEBUG level according to the specified format and argument.- Parameters:
format
- the format stringarg
- the argument
-
debug
public void debug(String format, Object arg1, Object arg2)
Description copied from interface:Logger
Log a message at the DEBUG level according to the specified format and arguments.- Parameters:
format
- the format stringarg1
- the first argumentarg2
- the second argument
-
debug
public void debug(String format, Object... arguments)
Description copied from interface:Logger
Log a message at the DEBUG level according to the specified format and arguments.- Parameters:
format
- the format stringarguments
- a list of 3 or more arguments
-
debug
public void debug(String msg, Throwable t)
Description copied from interface:Logger
Log an exception (throwable) at the DEBUG level with an accompanying message.- Parameters:
msg
- the message accompanying the exceptiont
- the exception (throwable) to log
-
isInfoEnabled
public boolean isInfoEnabled()
Description copied from interface:Logger
Is the logger instance enabled for the INFO level?- Returns:
true
if this Logger is enabled for the INFO level,false
otherwise.
-
info
public void info(String msg)
Description copied from interface:Logger
Log a message at the INFO level.- Parameters:
msg
- the message string to be logged
-
info
public void info(String format, Object arg)
Description copied from interface:Logger
Log a message at the INFO level according to the specified format and argument.- Parameters:
format
- the format stringarg
- the argument
-
info
public void info(String format, Object arg1, Object arg2)
Description copied from interface:Logger
Log a message at the INFO level according to the specified format and arguments.- Parameters:
format
- the format stringarg1
- the first argumentarg2
- the second argument
-
info
public void info(String format, Object... arguments)
Description copied from interface:Logger
Log a message at the INFO level according to the specified format and arguments.- Parameters:
format
- the format stringarguments
- a list of 3 or more arguments
-
info
public void info(String msg, Throwable t)
Description copied from interface:Logger
Log an exception (throwable) at the INFO level with an accompanying message.- Parameters:
msg
- the message accompanying the exceptiont
- the exception (throwable) to log
-
isWarnEnabled
public boolean isWarnEnabled()
Description copied from interface:Logger
Is the logger instance enabled for the WARN level?- Returns:
true
if this Logger is enabled for the WARN level,false
otherwise.
-
warn
public void warn(String msg)
Description copied from interface:Logger
Log a message at the WARN level.- Parameters:
msg
- the message string to be logged
-
warn
public void warn(String format, Object arg)
Description copied from interface:Logger
Log a message at the WARN level according to the specified format and argument.- Parameters:
format
- the format stringarg
- the argument
-
warn
public void warn(String format, Object arg1, Object arg2)
Description copied from interface:Logger
Log a message at the WARN level according to the specified format and arguments.- Parameters:
format
- the format stringarg1
- the first argumentarg2
- the second argument
-
warn
public void warn(String format, Object... arguments)
Description copied from interface:Logger
Log a message at the WARN level according to the specified format and arguments.- Parameters:
format
- the format stringarguments
- a list of 3 or more arguments
-
warn
public void warn(String msg, Throwable t)
Description copied from interface:Logger
Log an exception (throwable) at the WARN level with an accompanying message.- Parameters:
msg
- the message accompanying the exceptiont
- the exception (throwable) to log
-
isErrorEnabled
public boolean isErrorEnabled()
Description copied from interface:Logger
Is the logger instance enabled for the ERROR level?- Returns:
true
if this Logger is enabled for the ERROR level,false
otherwise.
-
error
public void error(String msg)
Description copied from interface:Logger
Log a message at the ERROR level.- Parameters:
msg
- the message string to be logged
-
error
public void error(String format, Object arg)
Description copied from interface:Logger
Log a message at the ERROR level according to the specified format and argument.- Parameters:
format
- the format stringarg
- the argument
-
error
public void error(String format, Object arg1, Object arg2)
Description copied from interface:Logger
Log a message at the ERROR level according to the specified format and arguments.- Parameters:
format
- the format stringarg1
- the first argumentarg2
- the second argument
-
error
public void error(String format, Object... arguments)
Description copied from interface:Logger
Log a message at the ERROR level according to the specified format and arguments.- Parameters:
format
- the format stringarguments
- a list of 3 or more arguments
-
error
public void error(String msg, Throwable t)
Description copied from interface:Logger
Log an exception (throwable) at the ERROR level with an accompanying message.- Parameters:
msg
- the message accompanying the exceptiont
- the exception (throwable) to log
-
name
public String name()
Description copied from interface:Logger
Return the name of thisLogger
instance.
-
trace
public void trace(String format, Supplier<Object> supplier)
Description copied from interface:Logger
Log a message at the TRACE level according to the specified format and argument supplier.The supplier is not called when the logger is disabled for the TRACE level.
-
trace
public void trace(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
Description copied from interface:Logger
Log a message at the TRACE level according to the specified format and argument suppliers.The suppliers are not called when the logger is disabled for the TRACE level.
-
trace
@SafeVarargs public final void trace(String format, Supplier<Object>... suppliers)
Description copied from interface:Logger
Log a message at the TRACE level according to the specified format and argument suppliers.The suppliers are not called when the logger is disabled for the TRACE level.
-
trace
public void trace(Throwable t)
Description copied from interface:Logger
Log an exception (throwable) at the TRACE level.
-
debug
public void debug(String format, Supplier<Object> supplier)
Description copied from interface:Logger
Log a message at the DEBUG level according to the specified format and argument supplier.The supplier is not called when the logger is disabled for the DEBUG level.
-
debug
public void debug(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
Description copied from interface:Logger
Log a message at the DEBUG level according to the specified format and argument suppliers.The suppliers are not called when the logger is disabled for the DEBUG level.
-
debug
@SafeVarargs public final void debug(String format, Supplier<Object>... suppliers)
Description copied from interface:Logger
Log a message at the DEBUG level according to the specified format and argument suppliers.The suppliers are not called when the logger is disabled for the DEBUG level.
-
debug
public void debug(Throwable t)
Description copied from interface:Logger
Log an exception (throwable) at the DEBUG level.
-
info
public void info(String format, Supplier<Object> supplier)
Description copied from interface:Logger
Log a message at the INFO level according to the specified format and argument supplier.The supplier is not called when the logger is disabled for the INFO level.
-
info
public void info(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
Description copied from interface:Logger
Log a message at the INFO level according to the specified format and argument suppliers.The suppliers are not called when the logger is disabled for the INFO level.
-
info
@SafeVarargs public final void info(String format, Supplier<Object>... suppliers)
Description copied from interface:Logger
Log a message at the INFO level according to the specified format and argument suppliers.The suppliers are not called when the logger is disabled for the INFO level.
-
info
public void info(Throwable t)
Description copied from interface:Logger
Log an exception (throwable) at the INFO level.
-
warn
public void warn(String format, Supplier<Object> supplier)
Description copied from interface:Logger
Log a message at the WARN level according to the specified format and argument supplier.The supplier is not called when the logger is disabled for the WARN level.
-
warn
public void warn(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
Description copied from interface:Logger
Log a message at the WARN level according to the specified format and argument suppliers.The suppliers are not called when the logger is disabled for the WARN level.
-
warn
@SafeVarargs public final void warn(String format, Supplier<Object>... suppliers)
Description copied from interface:Logger
Log a message at the WARN level according to the specified format and argument suppliers.The suppliers are not called when the logger is disabled for the WARN level.
-
warn
public void warn(Throwable t)
Description copied from interface:Logger
Log an exception (throwable) at the WARN level.
-
error
public void error(String format, Supplier<Object> supplier)
Description copied from interface:Logger
Log a message at the ERROR level according to the specified format and argument supplier.The supplier is not called when the logger is disabled for the ERROR level.
-
error
public void error(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
Description copied from interface:Logger
Log a message at the ERROR level according to the specified format and argument suppliers.The suppliers are not called when the logger is disabled for the ERROR level.
-
error
@SafeVarargs public final void error(String format, Supplier<Object>... suppliers)
Description copied from interface:Logger
Log a message at the ERROR level according to the specified format and argument suppliers.The suppliers are not called when the logger is disabled for the ERROR level.
-
error
public void error(Throwable t)
Description copied from interface:Logger
Log an exception (throwable) at the ERROR level.
-
isEnabled
public boolean isEnabled(LogLevel level)
Description copied from interface:Logger
Is the logger instance enabled for the specifiedlevel
?
-
log
public void log(LogLevel level, String msg)
Description copied from interface:Logger
Log a message at the specifiedlevel
level.
-
log
public void log(LogLevel level, String format, Object arg)
Description copied from interface:Logger
Log a message at the specifiedlevel
level according to the specified format and argument.
-
log
public void log(LogLevel level, String format, Supplier<Object> supplier)
Description copied from interface:Logger
Log a message at the specifiedlevel
level according to the specified format and argument supplier.The supplier is not called when the logger is disabled for the specified
level
level.
-
log
public void log(LogLevel level, String format, Object arg1, Object arg2)
Description copied from interface:Logger
Log a message at the specifiedlevel
level according to the specified format and arguments.
-
log
public void log(LogLevel level, String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
Description copied from interface:Logger
Log a message at the specifiedlevel
level according to the specified format and argument suppliers.The suppliers are not called when the logger is disabled for the specified
level
level.
-
log
public void log(LogLevel level, String format, Object... arguments)
Description copied from interface:Logger
Log a message at the specifiedlevel
level according to the specified format and arguments.
-
log
@SafeVarargs public final void log(LogLevel level, String format, Supplier<Object>... suppliers)
Description copied from interface:Logger
Log a message at the specifiedlevel
level according to the specified format and argument suppliers.The suppliers are not called when the logger is disabled for the specified
level
level.
-
log
public void log(LogLevel level, String msg, Throwable t)
Description copied from interface:Logger
Log an exception (throwable) at the specifiedlevel
level with an accompanying message.
-
-