Package com.luciad.util.logging
Interface ILcdLogger
public interface ILcdLogger
Logging interface for LuciadLightspeed. It acts as a wrapper around a concrete logging framework implementation.
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:
- trace
- debug
- info
- warn
- error
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");
- Since:
- 9.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Records a debug message.void
Records a debug message and an associated parameter object.default void
Records a debug message and the associated parameters.void
Records a debug message, an associated parameter and aThrowable
object.void
Records a debug message and aThrowable
object.default void
Records a debug message, the associated parameters and aThrowable
object.default void
Records a debug message supplier, which is only evaluated when debug messages are enabled.default void
Records aThrowable
object and a debug message supplier, which is only evaluated when debug messages are enabled.void
Records an error message.void
Records an error message and an associated parameter object.default void
Records an error message and the associated parameters.void
Records an error message, an associated parameter and aThrowable
object.void
Records an error message and aThrowable
object.default void
Records an error message, the associated parameters and aThrowable
object.default void
Records an error message supplier, which is only evaluated when error messages are enabled.default void
Records aThrowable
object and an error message supplier, which is only evaluated when error messages are enabled.void
Records an informational message.void
Records an informational message and an associated parameter object.default void
Records an informational message and the associated parameters.void
Records an informational message, an associated parameter and aThrowable
object.void
Records an informational message and aThrowable
object.default void
Records an informational message, the associated parameters and aThrowable
object.default void
Records an info message supplier, which is only evaluated when info messages are enabled.default void
Records aThrowable
object and an info message supplier, which is only evaluated when info messages are enabled.boolean
Returns true if debug messages are logged.boolean
Returns true if error messages are logged.boolean
Returns true if informational messages are logged.boolean
Returns true if trace messages are logged.boolean
Returns true if warning messages are logged.void
Records a trace message.void
Records a trace message and an associated parameter object.default void
Records a trace message and the associated parameters.void
Records a trace message, an associated parameter and aThrowable
object.void
Records a trace message and aThrowable
object.default void
Records a trace message, the associated parameters and aThrowable
object.default void
Records a trace message supplier, which is only evaluated when trace messages are enabled.default void
Records aThrowable
object and a trace message supplier, which is only evaluated when trace messages are enabled.void
Records a warning message.void
Records a warning message and an associated parameter object.default void
Records a warning message and the associated parameters.void
Records a warning message, an associated parameter and aThrowable
object.void
Records a warning message and aThrowable
object.default void
Records a warning message, the associated parameters and aThrowable
object.default void
Records a warning message supplier, which is only evaluated when warning messages are enabled.default void
Records aThrowable
object and a warning message supplier, which is only evaluated when warning messages are enabled.
-
Method Details
-
isTraceEnabled
boolean isTraceEnabled()Returns true if trace messages are logged.- Returns:
- true if trace messages are logged, false otherwise.
-
trace
Records 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.- Parameters:
aMessageSupplier
- A function, which when called, produces the desired log message- Since:
- 2017.0
-
trace
Records a trace message.- Parameters:
aMessage
- theformatted
message.
-
trace
Records aThrowable
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.- Parameters:
aMessageSupplier
- A function, which when called, produces the desired logformatted
message.aThrowable
- theThrowable
object.- Since:
- 2017.0
-
trace
Records a trace message and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aThrowable
- theThrowable
object.
-
trace
Records a trace message and an associated parameter object.- Parameters:
aMessage
- theformatted
message.aParameter
- a parameter referenced by the message
-
trace
Records a trace message and the associated parameters.- Parameters:
aMessage
- theformatted
message.aParameters
- the parameters referenced by the message- Since:
- 2019.1
-
trace
Records a trace message, an associated parameter and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aParameter
- the associated parameter.aThrowable
- the associatedThrowable
.
-
trace
Records a trace message, the associated parameters and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aThrowable
- the associatedThrowable
.aParameters
- the associated parameters.- Since:
- 2019.1
-
isDebugEnabled
boolean isDebugEnabled()Returns true if debug messages are logged.- Returns:
- true if debug messages are logged, false otherwise.
-
debug
Records 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.- Parameters:
aMessageSupplier
- A function, which when called, produces the desired log message- Since:
- 2017.0
-
debug
Records a debug message.- Parameters:
aMessage
- theformatted
message.
-
debug
Records aThrowable
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.- Parameters:
aMessageSupplier
- A function, which when called, produces the desired logformatted
message.aThrowable
- theThrowable
object.- Since:
- 2017.0
-
debug
Records a debug message and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aThrowable
- theThrowable
object.
-
debug
Records a debug message and an associated parameter object.- Parameters:
aMessage
- theformatted
message.aParameter
- a parameter referenced by the message
-
debug
Records a debug message and the associated parameters.- Parameters:
aMessage
- theformatted
message.aParameters
- the parameters referenced by the message- Since:
- 2019.1
-
debug
Records a debug message, an associated parameter and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aParameter
- a parameter referenced by the messageaThrowable
- the associatedThrowable
.
-
debug
Records a debug message, the associated parameters and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aThrowable
- the associatedThrowable
.aParameters
- the parameters referenced by the message- Since:
- 2019.1
-
isInfoEnabled
boolean isInfoEnabled()Returns true if informational messages are logged.- Returns:
- true if informational messages are logged, false otherwise.
-
info
Records 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.- Parameters:
aMessageSupplier
- A function, which when called, produces the desired log message- Since:
- 2017.0
-
info
Records an informational message.- Parameters:
aMessage
- the informational message.
-
info
Records aThrowable
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.- Parameters:
aMessageSupplier
- A function, which when called, produces the desired logformatted
message.aThrowable
- theThrowable
object.- Since:
- 2017.0
-
info
Records an informational message and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aThrowable
- theThrowable
object.
-
info
Records an informational message and an associated parameter object.- Parameters:
aMessage
- theformatted
message.aParameter
- a parameter that can be referenced by the message
-
info
Records an informational message and the associated parameters.- Parameters:
aMessage
- theformatted
message.aParameters
- the parameters that can be referenced by the message- Since:
- 2019.1
-
info
Records an informational message, an associated parameter and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aParameter
- a parameter that can be referenced by the messageaThrowable
- the associatedThrowable
.
-
info
Records an informational message, the associated parameters and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aThrowable
- the associatedThrowable
.aParameters
- the parameters that can be referenced by the message- Since:
- 2019.1
-
isWarnEnabled
boolean isWarnEnabled()Returns true if warning messages are logged.- Returns:
- true if warning messages are logged, false otherwise.
-
warn
Records 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.- Parameters:
aMessageSupplier
- A function, which when called, produces the desired log message- Since:
- 2017.0
-
warn
Records a warning message.- Parameters:
aMessage
- theformatted
message.
-
warn
Records aThrowable
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.- Parameters:
aMessageSupplier
- A function, which when called, produces the desired logformatted
message.aThrowable
- theThrowable
object.- Since:
- 2017.0
-
warn
Records a warning message and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aThrowable
- theThrowable
object.
-
warn
Records a warning message and an associated parameter object.- Parameters:
aMessage
- theformatted
message.aParameter
- a parameter that can be referenced by the message
-
warn
Records a warning message and the associated parameters.- Parameters:
aMessage
- theformatted
message.aParameters
- the parameters that can be referenced by the message- Since:
- 2019.1
-
warn
Records a warning message, an associated parameter and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aParameter
- a parameter that can be referenced by the messageaThrowable
- the associatedThrowable
.
-
warn
Records a warning message, the associated parameters and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aThrowable
- the associatedThrowable
.aParameters
- the parameters that can be referenced by the message- Since:
- 2019.1
-
isErrorEnabled
boolean isErrorEnabled()Returns true if error messages are logged.- Returns:
- true if error messages are logged, false otherwise.
-
error
Records 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.- Parameters:
aMessageSupplier
- A function, which when called, produces the desired log message- Since:
- 2017.0
-
error
Records an error message.- Parameters:
aMessage
- theformatted
message.
-
error
Records aThrowable
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.- Parameters:
aMessageSupplier
- A function, which when called, produces the desired logformatted
message.aThrowable
- theThrowable
object.- Since:
- 2017.0
-
error
Records an error message and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aThrowable
- theThrowable
object.
-
error
Records an error message and an associated parameter object.- Parameters:
aMessage
- theformatted
message.aParameter
- a parameter that can be referenced by the message
-
error
Records an error message and the associated parameters.- Parameters:
aMessage
- theformatted
message.aParameters
- the parameters that can be referenced by the message- Since:
- 2019.1
-
error
Records an error message, an associated parameter and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aParameter
- a parameter that can be referenced by the messageaThrowable
- the associatedThrowable
.
-
error
Records an error message, the associated parameters and aThrowable
object.- Parameters:
aMessage
- theformatted
message.aThrowable
- the associatedThrowable
.aParameters
- the parameters that can be referenced by the message- Since:
- 2019.1
-