public interface ILcdLogger
You typically don't need to use ILcdLogger
directly. Instead, you can use the logging framework of your
choice and make sure LuciadLightspeed connects to it by configuring
an ILcdLoggerFactory
,
as illustrated in this tutorial.
Sorted in ascending order of importance, the log levels are:
Supplier<String>
as argument can be used to simplify statements like:
//String concatenation only happens when the message will be logged
//thanks to the if check
if (logger.isDebugEnabled()){
logger.debug( "A message with " + "expensive String concatenation");
}
to
//String concatenation will still only happen when the message will be logged,
//but the if check can be avoided
logger.debug( () -> "A message with " + "expensive String concatenation");
ILcdLoggerFactory
Modifier and Type | Method and Description |
---|---|
void |
debug(String aMessage)
Records a debug message.
|
default void |
debug(String aMessage,
Object... aParameters)
Records a debug message and the associated parameters.
|
void |
debug(String aMessage,
Object aParameter)
Records a debug message and an associated parameter object.
|
void |
debug(String aMessage,
Object aParameter,
Throwable aThrowable)
Records a debug message, an associated parameter and a
Throwable object. |
void |
debug(String aMessage,
Throwable aThrowable)
Records a debug message and a
Throwable object. |
default void |
debug(String aMessage,
Throwable aThrowable,
Object... aParameters)
Records a debug message, the associated parameters and a
Throwable object. |
default void |
debug(Supplier<String> aMessageSupplier)
Records a debug message supplier, which is only evaluated when debug messages are enabled.
|
default void |
debug(Supplier<String> aMessageSupplier,
Throwable aThrowable)
Records a
Throwable object and a debug message supplier, which is only evaluated when debug messages are enabled. |
void |
error(String aMessage)
Records an error message.
|
default void |
error(String aMessage,
Object... aParameters)
Records an error message and the associated parameters.
|
void |
error(String aMessage,
Object aParameter)
Records an error message and an associated parameter object.
|
void |
error(String aMessage,
Object aParameter,
Throwable aThrowable)
Records an error message, an associated parameter and a
Throwable object. |
void |
error(String aMessage,
Throwable aThrowable)
Records an error message and a
Throwable object. |
default void |
error(String aMessage,
Throwable aThrowable,
Object... aParameters)
Records an error message, the associated parameters and a
Throwable object. |
default void |
error(Supplier<String> aMessageSupplier)
Records an error message supplier, which is only evaluated when error messages are enabled.
|
default void |
error(Supplier<String> aMessageSupplier,
Throwable aThrowable)
Records a
Throwable object and an error message supplier, which is only evaluated when error messages are enabled. |
void |
info(String aMessage)
Records an informational message.
|
default void |
info(String aMessage,
Object... aParameters)
Records an informational message and the associated parameters.
|
void |
info(String aMessage,
Object aParameter)
Records an informational message and an associated parameter object.
|
void |
info(String aMessage,
Object aParameter,
Throwable aThrowable)
Records an informational message, an associated parameter and a
Throwable object. |
void |
info(String aMessage,
Throwable aThrowable)
Records an informational message and a
Throwable object. |
default void |
info(String aMessage,
Throwable aThrowable,
Object... aParameters)
Records an informational message, the associated parameters and a
Throwable object. |
default void |
info(Supplier<String> aMessageSupplier)
Records an info message supplier, which is only evaluated when info messages are enabled.
|
default void |
info(Supplier<String> aMessageSupplier,
Throwable aThrowable)
Records a
Throwable object and an info message supplier, which is only evaluated when info messages are enabled. |
boolean |
isDebugEnabled()
Returns true if debug messages are logged.
|
boolean |
isErrorEnabled()
Returns true if error messages are logged.
|
boolean |
isInfoEnabled()
Returns true if informational messages are logged.
|
boolean |
isTraceEnabled()
Returns true if trace messages are logged.
|
boolean |
isWarnEnabled()
Returns true if warning messages are logged.
|
void |
trace(String aMessage)
Records a trace message.
|
default void |
trace(String aMessage,
Object... aParameters)
Records a trace message and the associated parameters.
|
void |
trace(String aMessage,
Object aParameter)
Records a trace message and an associated parameter object.
|
void |
trace(String aMessage,
Object aParameter,
Throwable aThrowable)
Records a trace message, an associated parameter and a
Throwable object. |
void |
trace(String aMessage,
Throwable aThrowable)
Records a trace message and a
Throwable object. |
default void |
trace(String aMessage,
Throwable aThrowable,
Object... aParameters)
Records a trace message, the associated parameters and a
Throwable object. |
default void |
trace(Supplier<String> aMessageSupplier)
Records a trace message supplier, which is only evaluated when trace messages are enabled.
|
default void |
trace(Supplier<String> aMessageSupplier,
Throwable aThrowable)
Records a
Throwable object and a trace message supplier, which is only evaluated when trace messages are enabled. |
void |
warn(String aMessage)
Records a warning message.
|
default void |
warn(String aMessage,
Object... aParameters)
Records a warning message and the associated parameters.
|
void |
warn(String aMessage,
Object aParameter)
Records a warning message and an associated parameter object.
|
void |
warn(String aMessage,
Object aParameter,
Throwable aThrowable)
Records a warning message, an associated parameter and a
Throwable object. |
void |
warn(String aMessage,
Throwable aThrowable)
Records a warning message and a
Throwable object. |
default void |
warn(String aMessage,
Throwable aThrowable,
Object... aParameters)
Records a warning message, the associated parameters and a
Throwable object. |
default void |
warn(Supplier<String> aMessageSupplier)
Records a warning message supplier, which is only evaluated when warning messages are enabled.
|
default void |
warn(Supplier<String> aMessageSupplier,
Throwable aThrowable)
Records a
Throwable object and a warning message supplier, which is only evaluated when warning messages are enabled. |
boolean isTraceEnabled()
default void trace(Supplier<String> aMessageSupplier)
aMessageSupplier
- A function, which when called, produces the desired log messagevoid trace(String aMessage)
aMessage
- the formatted
message.default void trace(Supplier<String> aMessageSupplier, Throwable aThrowable)
Throwable
object and a trace message supplier, which is only evaluated when trace messages are enabled.
This method can be used to remove the overhead of generating a message (for example String concatenation)
when messages will not actually be logged.aMessageSupplier
- A function, which when called, produces the desired log formatted
message.aThrowable
- the Throwable
object.void trace(String aMessage, Throwable aThrowable)
Throwable
object.aMessage
- the formatted
message.aThrowable
- the Throwable
object.void trace(String aMessage, Object aParameter)
aMessage
- the formatted
message.aParameter
- a parameter referenced by the messagedefault void trace(String aMessage, Object... aParameters)
aMessage
- the formatted
message.aParameters
- the parameters referenced by the messagevoid trace(String aMessage, Object aParameter, Throwable aThrowable)
Throwable
object.aMessage
- the formatted
message.aParameter
- the associated parameter.aThrowable
- the associated Throwable
.default void trace(String aMessage, Throwable aThrowable, Object... aParameters)
Throwable
object.aMessage
- the formatted
message.aThrowable
- the associated Throwable
.aParameters
- the associated parameters.boolean isDebugEnabled()
default void debug(Supplier<String> aMessageSupplier)
aMessageSupplier
- A function, which when called, produces the desired log messagevoid debug(String aMessage)
aMessage
- the formatted
message.default void debug(Supplier<String> aMessageSupplier, Throwable aThrowable)
Throwable
object and a debug message supplier, which is only evaluated when debug messages are enabled.
This method can be used to remove the overhead of generating a message (for example String concatenation)
when messages will not actually be logged.aMessageSupplier
- A function, which when called, produces the desired log formatted
message.aThrowable
- the Throwable
object.void debug(String aMessage, Throwable aThrowable)
Throwable
object.aMessage
- the formatted
message.aThrowable
- the Throwable
object.void debug(String aMessage, Object aParameter)
aMessage
- the formatted
message.aParameter
- a parameter referenced by the messagedefault void debug(String aMessage, Object... aParameters)
aMessage
- the formatted
message.aParameters
- the parameters referenced by the messagevoid debug(String aMessage, Object aParameter, Throwable aThrowable)
Throwable
object.aMessage
- the formatted
message.aParameter
- a parameter referenced by the messageaThrowable
- the associated Throwable
.default void debug(String aMessage, Throwable aThrowable, Object... aParameters)
Throwable
object.aMessage
- the formatted
message.aThrowable
- the associated Throwable
.aParameters
- the parameters referenced by the messageboolean isInfoEnabled()
default void info(Supplier<String> aMessageSupplier)
aMessageSupplier
- A function, which when called, produces the desired log messagevoid info(String aMessage)
aMessage
- the informational message.default void info(Supplier<String> aMessageSupplier, Throwable aThrowable)
Throwable
object and an info message supplier, which is only evaluated when info messages are enabled.
This method can be used to remove the overhead of generating a message (for example String concatenation)
when messages will not actually be logged.aMessageSupplier
- A function, which when called, produces the desired log formatted
message.aThrowable
- the Throwable
object.void info(String aMessage, Throwable aThrowable)
Throwable
object.aMessage
- the formatted
message.aThrowable
- the Throwable
object.void info(String aMessage, Object aParameter)
aMessage
- the formatted
message.aParameter
- a parameter that can be referenced by the messagedefault void info(String aMessage, Object... aParameters)
aMessage
- the formatted
message.aParameters
- the parameters that can be referenced by the messagevoid info(String aMessage, Object aParameter, Throwable aThrowable)
Throwable
object.aMessage
- the formatted
message.aParameter
- a parameter that can be referenced by the messageaThrowable
- the associated Throwable
.default void info(String aMessage, Throwable aThrowable, Object... aParameters)
Throwable
object.aMessage
- the formatted
message.aThrowable
- the associated Throwable
.aParameters
- the parameters that can be referenced by the messageboolean isWarnEnabled()
default void warn(Supplier<String> aMessageSupplier)
aMessageSupplier
- A function, which when called, produces the desired log messagevoid warn(String aMessage)
aMessage
- the formatted
message.default void warn(Supplier<String> aMessageSupplier, Throwable aThrowable)
Throwable
object and a warning message supplier, which is only evaluated when warning messages are enabled.
This method can be used to remove the overhead of generating a message (for example String concatenation)
when messages will not actually be logged.aMessageSupplier
- A function, which when called, produces the desired log formatted
message.aThrowable
- the Throwable
object.void warn(String aMessage, Throwable aThrowable)
Throwable
object.aMessage
- the formatted
message.aThrowable
- the Throwable
object.void warn(String aMessage, Object aParameter)
aMessage
- the formatted
message.aParameter
- a parameter that can be referenced by the messagedefault void warn(String aMessage, Object... aParameters)
aMessage
- the formatted
message.aParameters
- the parameters that can be referenced by the messagevoid warn(String aMessage, Object aParameter, Throwable aThrowable)
Throwable
object.aMessage
- the formatted
message.aParameter
- a parameter that can be referenced by the messageaThrowable
- the associated Throwable
.default void warn(String aMessage, Throwable aThrowable, Object... aParameters)
Throwable
object.aMessage
- the formatted
message.aThrowable
- the associated Throwable
.aParameters
- the parameters that can be referenced by the messageboolean isErrorEnabled()
default void error(Supplier<String> aMessageSupplier)
aMessageSupplier
- A function, which when called, produces the desired log messagevoid error(String aMessage)
aMessage
- the formatted
message.default void error(Supplier<String> aMessageSupplier, Throwable aThrowable)
Throwable
object and an error message supplier, which is only evaluated when error messages are enabled.
This method can be used to remove the overhead of generating a message (for example String concatenation)
when messages will not actually be logged.aMessageSupplier
- A function, which when called, produces the desired log formatted
message.aThrowable
- the Throwable
object.void error(String aMessage, Throwable aThrowable)
Throwable
object.aMessage
- the formatted
message.aThrowable
- the Throwable
object.void error(String aMessage, Object aParameter)
aMessage
- the formatted
message.aParameter
- a parameter that can be referenced by the messagedefault void error(String aMessage, Object... aParameters)
aMessage
- the formatted
message.aParameters
- the parameters that can be referenced by the messagevoid error(String aMessage, Object aParameter, Throwable aThrowable)
Throwable
object.aMessage
- the formatted
message.aParameter
- a parameter that can be referenced by the messageaThrowable
- the associated Throwable
.default void error(String aMessage, Throwable aThrowable, Object... aParameters)
Throwable
object.aMessage
- the formatted
message.aParameters
- the parameters that can be referenced by the messageaThrowable
- the associated Throwable
.