-
- All Implemented Interfaces:
public class LoggerStatic logger for issuing log entries.
-
-
Method Summary
Modifier and Type Method Description final TaggedLoggertag(String tag)Gets a tagged logger instance. final TaggedLoggertags(String tags)Gets a tagged logger instance that logs to multiple tags. final BooleanisTraceEnabled()Checks whether log entries at TRACE level will be output. final Unittrace(Object message)Logs a message at TRACE level. final Unittrace(String message)Logs a message at TRACE level. final Unittrace(Function0<String> message)Logs a lazy message at TRACE level. final Unittrace(String message, Object arguments)Logs a formatted message at TRACE level. final Unittrace(String message, Function0<Object> arguments)Logs a formatted message at TRACE level. final Unittrace(Throwable exception)Logs an exception at TRACE level. final Unittrace(Throwable exception, String message)Logs an exception with a custom message at TRACE level. final Unittrace(Throwable exception, Function0<String> message)Logs an exception with a custom lazy message at TRACE level. final Unittrace(Throwable exception, String message, Object arguments)Logs an exception with a formatted custom message at TRACE level. final Unittrace(Throwable exception, String message, Function0<Object> arguments)Logs an exception with a formatted message at TRACE level. final BooleanisDebugEnabled()Checks whether log entries at DEBUG level will be output. final Unitdebug(Object message)Logs a message at DEBUG level. final Unitdebug(String message)Logs a message at DEBUG level. final Unitdebug(Function0<String> message)Logs a lazy message at DEBUG level. final Unitdebug(String message, Object arguments)Logs a formatted message at DEBUG level. final Unitdebug(String message, Function0<Object> arguments)Logs a formatted message at DEBUG level. final Unitdebug(Throwable exception)Logs an exception at DEBUG level. final Unitdebug(Throwable exception, String message)Logs an exception with a custom message at DEBUG level. final Unitdebug(Throwable exception, Function0<String> message)Logs an exception with a custom lazy message at DEBUG level. final Unitdebug(Throwable exception, String message, Object arguments)Logs an exception with a formatted custom message at DEBUG level. final Unitdebug(Throwable exception, String message, Function0<Object> arguments)Logs an exception with a formatted message at DEBUG level. final BooleanisInfoEnabled()Checks whether log entries at INFO level will be output. final Unitinfo(Object message)Logs a message at INFO level. final Unitinfo(String message)Logs a message at INFO level. final Unitinfo(Function0<String> message)Logs a lazy message at INFO level. final Unitinfo(String message, Object arguments)Logs a formatted message at INFO level. final Unitinfo(String message, Function0<Object> arguments)Logs a formatted message at INFO level. final Unitinfo(Throwable exception)Logs an exception at INFO level. final Unitinfo(Throwable exception, String message)Logs an exception with a custom message at INFO level. final Unitinfo(Throwable exception, Function0<String> message)Logs an exception with a custom lazy message at INFO level. final Unitinfo(Throwable exception, String message, Object arguments)Logs an exception with a formatted custom message at INFO level. final Unitinfo(Throwable exception, String message, Function0<Object> arguments)Logs an exception with a formatted message at INFO level. final BooleanisWarnEnabled()Checks whether log entries at WARN level will be output. final Unitwarn(Object message)Logs a message at WARN level. final Unitwarn(String message)Logs a message at WARN level. final Unitwarn(Function0<String> message)Logs a lazy message at WARN level. final Unitwarn(String message, Object arguments)Logs a formatted message at WARN level. final Unitwarn(String message, Function0<Object> arguments)Logs a formatted message at WARN level. final Unitwarn(Throwable exception)Logs an exception at WARN level. final Unitwarn(Throwable exception, String message)Logs an exception with a custom message at WARN level. final Unitwarn(Throwable exception, Function0<String> message)Logs an exception with a custom lazy message at WARN level. final Unitwarn(Throwable exception, String message, Object arguments)Logs an exception with a formatted custom message at WARN level. final Unitwarn(Throwable exception, String message, Function0<Object> arguments)Logs an exception with a formatted message at WARN level. final BooleanisErrorEnabled()Checks whether log entries at ERROR level will be output. final Uniterror(Object message)Logs a message at ERROR level. final Uniterror(String message)Logs a message at ERROR level. final Uniterror(Function0<String> message)Logs a lazy message at ERROR level. final Uniterror(String message, Object arguments)Logs a formatted message at ERROR level. final Uniterror(String message, Function0<Object> arguments)Logs a formatted message at ERROR level. final Uniterror(Throwable exception)Logs an exception at ERROR level. final Uniterror(Throwable exception, String message)Logs an exception with a custom message at ERROR level. final Uniterror(Throwable exception, Function0<String> message)Logs an exception with a custom lazy message at ERROR level. final Uniterror(Throwable exception, String message, Object arguments)Logs an exception with a formatted custom message at ERROR level. final Uniterror(Throwable exception, String message, Function0<Object> arguments)Logs an exception with a formatted message at ERROR level. -
-
Method Detail
-
tag
final TaggedLogger tag(String tag)
Gets a tagged logger instance. Tags are case-sensitive.
- Parameters:
tag- Tag for logger ornullfor receiving an untagged logger
-
tags
final TaggedLogger tags(String tags)
Gets a tagged logger instance that logs to multiple tags. Tags are case-sensitive.
- Parameters:
tags- Tags for the logger or nothing for an untagged logger.
-
isTraceEnabled
final Boolean isTraceEnabled()
Checks whether log entries at TRACE level will be output.
-
trace
final Unit trace(Object message)
Logs a message at TRACE level.
- Parameters:
message- Any object with a meaningful Any.toString method
-
trace
final Unit trace(String message)
Logs a message at TRACE level.
- Parameters:
message- Text message to log
-
trace
final Unit trace(Function0<String> message)
Logs a lazy message at TRACE level. The message will be only evaluated if the log entry is really output.
- Parameters:
message- Function that produces the message
-
trace
final Unit trace(String message, Object arguments)
Logs a formatted message at TRACE level. "{}" placeholders will be replaced by given arguments.
- Parameters:
message- Formatted text message to logarguments- Arguments for formatted text message
-
trace
final Unit trace(String message, Function0<Object> arguments)
Logs a formatted message at TRACE level. "{}" placeholders will be replaced by given lazy arguments. The arguments will be only evaluated if the log entry is really output.
- Parameters:
message- Formatted text message to logarguments- Functions that produce the arguments for formatted text message
-
trace
final Unit trace(Throwable exception)
Logs an exception at TRACE level.
- Parameters:
exception- Caught exception or any other throwable to log
-
trace
final Unit trace(Throwable exception, String message)
Logs an exception with a custom message at TRACE level.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Text message to log
-
trace
final Unit trace(Throwable exception, Function0<String> message)
Logs an exception with a custom lazy message at TRACE level. The message will be only evaluated if the log entry is really output.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Function that produces the message
-
trace
final Unit trace(Throwable exception, String message, Object arguments)
Logs an exception with a formatted custom message at TRACE level. "{}" placeholders will be replaced by given arguments.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Formatted text message to logarguments- Arguments for formatted text message
-
trace
final Unit trace(Throwable exception, String message, Function0<Object> arguments)
Logs an exception with a formatted message at TRACE level. "{}" placeholders will be replaced by given lazy arguments. The arguments will be only evaluated if the log entry is really output.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Formatted text message to logarguments- Functions that produce the arguments for formatted text message
-
isDebugEnabled
final Boolean isDebugEnabled()
Checks whether log entries at DEBUG level will be output.
-
debug
final Unit debug(Object message)
Logs a message at DEBUG level.
- Parameters:
message- Any object with a meaningful Any.toString method
-
debug
final Unit debug(String message)
Logs a message at DEBUG level.
- Parameters:
message- Text message to log
-
debug
final Unit debug(Function0<String> message)
Logs a lazy message at DEBUG level. The message will be only evaluated if the log entry is really output.
- Parameters:
message- Function that produces the message
-
debug
final Unit debug(String message, Object arguments)
Logs a formatted message at DEBUG level. "{}" placeholders will be replaced by given arguments.
- Parameters:
message- Formatted text message to logarguments- Arguments for formatted text message
-
debug
final Unit debug(String message, Function0<Object> arguments)
Logs a formatted message at DEBUG level. "{}" placeholders will be replaced by given lazy arguments. The arguments will be only evaluated if the log entry is really output.
- Parameters:
message- Formatted text message to logarguments- Functions that produce the arguments for formatted text message
-
debug
final Unit debug(Throwable exception)
Logs an exception at DEBUG level.
- Parameters:
exception- Caught exception or any other throwable to log
-
debug
final Unit debug(Throwable exception, String message)
Logs an exception with a custom message at DEBUG level.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Text message to log
-
debug
final Unit debug(Throwable exception, Function0<String> message)
Logs an exception with a custom lazy message at DEBUG level. The message will be only evaluated if the log entry is really output.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Function that produces the message
-
debug
final Unit debug(Throwable exception, String message, Object arguments)
Logs an exception with a formatted custom message at DEBUG level. "{}" placeholders will be replaced by given arguments.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Formatted text message to logarguments- Arguments for formatted text message
-
debug
final Unit debug(Throwable exception, String message, Function0<Object> arguments)
Logs an exception with a formatted message at DEBUG level. "{}" placeholders will be replaced by given lazy arguments. The arguments will be only evaluated if the log entry is really output.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Formatted text message to logarguments- Functions that produce the arguments for formatted text message
-
isInfoEnabled
final Boolean isInfoEnabled()
Checks whether log entries at INFO level will be output.
-
info
final Unit info(Object message)
Logs a message at INFO level.
- Parameters:
message- Any object with a meaningful Any.toString method
-
info
final Unit info(String message)
Logs a message at INFO level.
- Parameters:
message- Text message to log
-
info
final Unit info(Function0<String> message)
Logs a lazy message at INFO level. The message will be only evaluated if the log entry is really output.
- Parameters:
message- Function that produces the message
-
info
final Unit info(String message, Object arguments)
Logs a formatted message at INFO level. "{}" placeholders will be replaced by given arguments.
- Parameters:
message- Formatted text message to logarguments- Arguments for formatted text message
-
info
final Unit info(String message, Function0<Object> arguments)
Logs a formatted message at INFO level. "{}" placeholders will be replaced by given lazy arguments. The arguments will be only evaluated if the log entry is really output.
- Parameters:
message- Formatted text message to logarguments- Functions that produce the arguments for formatted text message
-
info
final Unit info(Throwable exception)
Logs an exception at INFO level.
- Parameters:
exception- Caught exception or any other throwable to log
-
info
final Unit info(Throwable exception, String message)
Logs an exception with a custom message at INFO level.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Text message to log
-
info
final Unit info(Throwable exception, Function0<String> message)
Logs an exception with a custom lazy message at INFO level. The message will be only evaluated if the log entry is really output.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Function that produces the message
-
info
final Unit info(Throwable exception, String message, Object arguments)
Logs an exception with a formatted custom message at INFO level. "{}" placeholders will be replaced by given arguments.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Formatted text message to logarguments- Arguments for formatted text message
-
info
final Unit info(Throwable exception, String message, Function0<Object> arguments)
Logs an exception with a formatted message at INFO level. "{}" placeholders will be replaced by given lazy arguments. The arguments will be only evaluated if the log entry is really output.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Formatted text message to logarguments- Functions that produce the arguments for formatted text message
-
isWarnEnabled
final Boolean isWarnEnabled()
Checks whether log entries at WARN level will be output.
-
warn
final Unit warn(Object message)
Logs a message at WARN level.
- Parameters:
message- Any object with a meaningful Any.toString method
-
warn
final Unit warn(String message)
Logs a message at WARN level.
- Parameters:
message- Text message to log
-
warn
final Unit warn(Function0<String> message)
Logs a lazy message at WARN level. The message will be only evaluated if the log entry is really output.
- Parameters:
message- Function that produces the message
-
warn
final Unit warn(String message, Object arguments)
Logs a formatted message at WARN level. "{}" placeholders will be replaced by given arguments.
- Parameters:
message- Formatted text message to logarguments- Arguments for formatted text message
-
warn
final Unit warn(String message, Function0<Object> arguments)
Logs a formatted message at WARN level. "{}" placeholders will be replaced by given lazy arguments. The arguments will be only evaluated if the log entry is really output.
- Parameters:
message- Formatted text message to logarguments- Functions that produce the arguments for formatted text message
-
warn
final Unit warn(Throwable exception)
Logs an exception at WARN level.
- Parameters:
exception- Caught exception or any other throwable to log
-
warn
final Unit warn(Throwable exception, String message)
Logs an exception with a custom message at WARN level.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Text message to log
-
warn
final Unit warn(Throwable exception, Function0<String> message)
Logs an exception with a custom lazy message at WARN level. The message will be only evaluated if the log entry is really output.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Function that produces the message
-
warn
final Unit warn(Throwable exception, String message, Object arguments)
Logs an exception with a formatted custom message at WARN level. "{}" placeholders will be replaced by given arguments.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Formatted text message to logarguments- Arguments for formatted text message
-
warn
final Unit warn(Throwable exception, String message, Function0<Object> arguments)
Logs an exception with a formatted message at WARN level. "{}" placeholders will be replaced by given lazy arguments. The arguments will be only evaluated if the log entry is really output.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Formatted text message to logarguments- Functions that produce the arguments for formatted text message
-
isErrorEnabled
final Boolean isErrorEnabled()
Checks whether log entries at ERROR level will be output.
-
error
final Unit error(Object message)
Logs a message at ERROR level.
- Parameters:
message- Any object with a meaningful Any.toString method
-
error
final Unit error(String message)
Logs a message at ERROR level.
- Parameters:
message- Text message to log
-
error
final Unit error(Function0<String> message)
Logs a lazy message at ERROR level. The message will be only evaluated if the log entry is really output.
- Parameters:
message- Function that produces the message
-
error
final Unit error(String message, Object arguments)
Logs a formatted message at ERROR level. "{}" placeholders will be replaced by given arguments.
- Parameters:
message- Formatted text message to logarguments- Arguments for formatted text message
-
error
final Unit error(String message, Function0<Object> arguments)
Logs a formatted message at ERROR level. "{}" placeholders will be replaced by given lazy arguments. The arguments will be only evaluated if the log entry is really output.
- Parameters:
message- Formatted text message to logarguments- Functions that produce the arguments for formatted text message
-
error
final Unit error(Throwable exception)
Logs an exception at ERROR level.
- Parameters:
exception- Caught exception or any other throwable to log
-
error
final Unit error(Throwable exception, String message)
Logs an exception with a custom message at ERROR level.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Text message to log
-
error
final Unit error(Throwable exception, Function0<String> message)
Logs an exception with a custom lazy message at ERROR level. The message will be only evaluated if the log entry is really output.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Function that produces the message
-
error
final Unit error(Throwable exception, String message, Object arguments)
Logs an exception with a formatted custom message at ERROR level. "{}" placeholders will be replaced by given arguments.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Formatted text message to logarguments- Arguments for formatted text message
-
error
final Unit error(Throwable exception, String message, Function0<Object> arguments)
Logs an exception with a formatted message at ERROR level. "{}" placeholders will be replaced by given lazy arguments. The arguments will be only evaluated if the log entry is really output.
- Parameters:
exception- Caught exception or any other throwable to logmessage- Formatted text message to logarguments- Functions that produce the arguments for formatted text message
-
-
-
-