Package elf4j
Interface Logger
- All Known Implementing Classes:
NoopLogger
public interface Logger
All
Logger
instances from this API should be immutable.-
Method Details
-
instance
- Returns:
- Logger instance with default name and Level
-
instance
- Parameters:
name
- suggested name of the Logger instance- Returns:
- Logger instance with the suggested name
-
instance
- Parameters:
clazz
- Class used to suggest the Logger name- Returns:
- Logger instance using the given Class as the suggested name
-
getName
String getName()- Returns:
- name of the logger instance
-
getLevel
Level getLevel()- Returns:
- log Level of the logger instance
-
isEnabled
boolean isEnabled()- Returns:
- true if the Logger instance is configured to be active per its name and Level, false otherwise
-
atTrace
Logger atTrace()- Returns:
- Logger instance with the same name, and TRACE log level
-
atDebug
Logger atDebug()- Returns:
- Logger instance with the same name, and DEBUG log level
-
atInfo
Logger atInfo()- Returns:
- Logger instance with the same name, and INFO log level
-
atWarn
Logger atWarn()- Returns:
- Logger instance with the same name, and WARN log level
-
atError
Logger atError()- Returns:
- Logger instance with the same name, and ERROR log level
-
log
- Parameters:
message
- to be logged. If the actual type isSupplier
, the result ofSupplier.get()
, instead of themessage
itself, should be used to construct the final log message.
-
log
- Parameters:
message
- to be loggedargs
- the arguments to replace the placeholders in the message. If any of the argument's actual type isSupplier
, the result ofSupplier.get()
, instead of the argument itself, should be used to construct the final log message.
-
log
- Parameters:
t
- the Throwable to be logged
-
log
- Parameters:
t
- the Throwable to be loggedmessage
- the message to be logged. If the actual type isSupplier
, the result ofSupplier.get()
, instead of themessage
itself, should be used to construct the final log message.
-
log
- Parameters:
t
- the Throwable to be loggedmessage
- the message to be loggedargs
- the arguments to replace the placeholders in the message. If any of argument's actual type isSupplier
, the result ofSupplier.get()
, instead of the argument itself, should be used to construct the final log message.
-