Package org.atlanmod.commons.log
Interface Logger
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface @ThreadSafe @Immutable @ParametersAreNullableByDefault public interface Logger
An object that provides logging operations, filtered byLevels.Implementations of this interface are expected to be thread-safe, and can be safely accessed by multiple concurrent threads.
-
-
Field Summary
Fields Modifier and Type Field Description static ThrowableNO_EXCEPTIONA throwable representing a logging without exception.static CharSequenceNO_MESSAGEA string representing a logging without message.static Object[]NO_PARAMSAn empty array representing logging without parameters.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voiddebug(CharSequence message)Logs a message at theDEBUGlevel.default voiddebug(CharSequence message, Object... params)Logs a message with parameters at theDEBUGlevel.default voiddebug(Object obj)Logs an object at theDEBUGlevel.default voiddebug(Throwable e)default voiddebug(Throwable e, CharSequence message)default voiddebug(Throwable e, CharSequence message, Object... params)default voiderror(CharSequence message)Logs a message at theERRORlevel.default voiderror(CharSequence message, Object... params)Logs a message with parameters at theERRORlevel.default voiderror(Object obj)Logs an object at theERRORlevel.default voiderror(Throwable e)default voiderror(Throwable e, CharSequence message)default voiderror(Throwable e, CharSequence message, Object... params)default voidinfo(CharSequence message)Logs a message at theINFOlevel.default voidinfo(CharSequence message, Object... params)Logs a message with parameters at theINFOlevel.default voidinfo(Object obj)Logs an object at theINFOlevel.default voidinfo(Throwable e)default voidinfo(Throwable e, CharSequence message)default voidinfo(Throwable e, CharSequence message, Object... params)default voidlog(Level level, CharSequence message)Logs a message at the givenlevel.default voidlog(Level level, CharSequence message, Object... params)Logs a message with parameters at the givenlevel.default voidlog(Level level, Object obj)Logs an object at the givenlevel.default voidlog(Level level, Throwable e)Logs the stack trace of the givenThrowableat the givenlevel.default voidlog(Level level, Throwable e, CharSequence message)Logs a message at the givenlevelincluding the stack trace of the givenThrowable.voidlog(Level level, Throwable e, CharSequence message, Object... params)Logs a message with parameters at the givenlevelincluding the stack trace of the givenThrowable.default voidtrace(CharSequence message)Logs a message at theTRACElevel.default voidtrace(CharSequence message, Object... params)Logs a message with parameters at theTRACElevel.default voidtrace(Object obj)Logs an object at theTRACElevel.default voidtrace(Throwable e)default voidtrace(Throwable e, CharSequence message)default voidtrace(Throwable e, CharSequence message, Object... params)default voidwarn(CharSequence message)Logs a message at theWARNlevel.default voidwarn(CharSequence message, Object... params)Logs a message with parameters at theWARNlevel.default voidwarn(Object obj)Logs an object at theWARNlevel.default voidwarn(Throwable e)default voidwarn(Throwable e, CharSequence message)default voidwarn(Throwable e, CharSequence message, Object... params)
-
-
-
Field Detail
-
NO_EXCEPTION
@Nullable static final Throwable NO_EXCEPTION
A throwable representing a logging without exception.WARNING: This field is present to ease the redirection of the methods of this interface; don't use it elsewhere.
-
NO_MESSAGE
@Nullable static final CharSequence NO_MESSAGE
A string representing a logging without message.WARNING: This field is present to ease the redirection of the methods of this interface; don't use it elsewhere.
-
NO_PARAMS
@Nonnull static final Object[] NO_PARAMS
An empty array representing logging without parameters.WARNING: This field is present to ease the redirection of the methods of this interface; don't use it elsewhere.
-
-
Method Detail
-
trace
default void trace(Object obj)
Logs an object at theTRACElevel.- Parameters:
obj- the object to log
-
trace
default void trace(CharSequence message)
Logs a message at theTRACElevel.- Parameters:
message- the message to log
-
trace
default void trace(CharSequence message, Object... params)
Logs a message with parameters at theTRACElevel.- Parameters:
message- the message to log; the format depends on theMessageFormatparams- parameters to the message
-
trace
default void trace(Throwable e)
- Parameters:
e- the exception to log, including its stack trace
-
trace
default void trace(Throwable e, CharSequence message)
- Parameters:
e- the exception to log, including its stack tracemessage- the message to log
-
trace
default void trace(Throwable e, CharSequence message, Object... params)
- Parameters:
e- the exception to log, including its stack tracemessage- the message to log; the format depends on theMessageFormatparams- parameters to the message
-
debug
default void debug(Object obj)
Logs an object at theDEBUGlevel.- Parameters:
obj- the object to log
-
debug
default void debug(CharSequence message)
Logs a message at theDEBUGlevel.- Parameters:
message- the message to log
-
debug
default void debug(CharSequence message, Object... params)
Logs a message with parameters at theDEBUGlevel.- Parameters:
message- the message to log; the format depends on theMessageFormatparams- parameters to the message
-
debug
default void debug(Throwable e)
- Parameters:
e- the exception to log, including its stack trace
-
debug
default void debug(Throwable e, CharSequence message)
- Parameters:
e- the exception to log, including its stack tracemessage- the message to log
-
debug
default void debug(Throwable e, CharSequence message, Object... params)
- Parameters:
e- the exception to log, including its stack tracemessage- the message to log; the format depends on theMessageFormatparams- parameters to the message
-
info
default void info(Object obj)
Logs an object at theINFOlevel.- Parameters:
obj- the object to log
-
info
default void info(CharSequence message)
Logs a message at theINFOlevel.- Parameters:
message- the message to log
-
info
default void info(CharSequence message, Object... params)
Logs a message with parameters at theINFOlevel.- Parameters:
message- the message to log; the format depends on theMessageFormatparams- parameters to the message
-
info
default void info(Throwable e)
- Parameters:
e- the exception to log, including its stack trace
-
info
default void info(Throwable e, CharSequence message)
- Parameters:
e- the exception to log, including its stack tracemessage- the message to log
-
info
default void info(Throwable e, CharSequence message, Object... params)
- Parameters:
e- the exception to log, including its stack tracemessage- the message to log; the format depends on theMessageFormatparams- parameters to the message
-
warn
default void warn(Object obj)
Logs an object at theWARNlevel.- Parameters:
obj- the object to log
-
warn
default void warn(CharSequence message)
Logs a message at theWARNlevel.- Parameters:
message- the message to log
-
warn
default void warn(CharSequence message, Object... params)
Logs a message with parameters at theWARNlevel.- Parameters:
message- the message to log; the format depends on theMessageFormatparams- parameters to the message
-
warn
default void warn(Throwable e)
- Parameters:
e- the exception to log, including its stack trace
-
warn
default void warn(Throwable e, CharSequence message)
- Parameters:
e- the exception to log, including its stack tracemessage- the message to log
-
warn
default void warn(Throwable e, CharSequence message, Object... params)
- Parameters:
e- the exception to log, including its stack tracemessage- the message to log; the format depends on theMessageFormatparams- parameters to the message
-
error
default void error(Object obj)
Logs an object at theERRORlevel.- Parameters:
obj- the object to log
-
error
default void error(CharSequence message)
Logs a message at theERRORlevel.- Parameters:
message- the message to log
-
error
default void error(CharSequence message, Object... params)
Logs a message with parameters at theERRORlevel.- Parameters:
message- the message to log; the format depends on theMessageFormatparams- parameters to the message
-
error
default void error(Throwable e)
- Parameters:
e- the exception to log, including its stack trace
-
error
default void error(Throwable e, CharSequence message)
- Parameters:
e- the exception to log, including its stack tracemessage- the message to log
-
error
default void error(Throwable e, CharSequence message, Object... params)
- Parameters:
e- the exception to log, including its stack tracemessage- the message to log; the format depends on theMessageFormatparams- parameters to the message
-
log
default void log(@Nonnull Level level, Object obj)Logs an object at the givenlevel.- Parameters:
level- the logging levelobj- the object to log
-
log
default void log(@Nonnull Level level, CharSequence message)Logs a message at the givenlevel.- Parameters:
level- the logging levelmessage- the message to log
-
log
default void log(@Nonnull Level level, CharSequence message, Object... params)Logs a message with parameters at the givenlevel.- Parameters:
level- the logging levelmessage- the message to log; the format depends on theMessageFormatparams- parameters to the message
-
log
default void log(@Nonnull Level level, Throwable e)Logs the stack trace of the givenThrowableat the givenlevel.- Parameters:
level- the logging levele- the exception to log, including its stack trace
-
log
default void log(@Nonnull Level level, Throwable e, CharSequence message)Logs a message at the givenlevelincluding the stack trace of the givenThrowable.- Parameters:
level- the logging levele- the exception to log, including its stack tracemessage- the message to log
-
log
void log(@Nonnull Level level, Throwable e, CharSequence message, Object... params)Logs a message with parameters at the givenlevelincluding the stack trace of the givenThrowable.- Parameters:
level- the logging levele- the exception to log, including its stack tracemessage- the message to log; the format depends on theMessageFormatparams- parameters to the message
-
-