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 TypeMethodDescriptionvoidRecords a debug message.voidRecords a debug message and an associated parameter object.default voidRecords a debug message and the associated parameters.voidRecords a debug message, an associated parameter and aThrowableobject.voidRecords a debug message and aThrowableobject.default voidRecords a debug message, the associated parameters and aThrowableobject.default voidRecords a debug message supplier, which is only evaluated when debug messages are enabled.default voidRecords aThrowableobject and a debug message supplier, which is only evaluated when debug messages are enabled.voidRecords an error message.voidRecords an error message and an associated parameter object.default voidRecords an error message and the associated parameters.voidRecords an error message, an associated parameter and aThrowableobject.voidRecords an error message and aThrowableobject.default voidRecords an error message, the associated parameters and aThrowableobject.default voidRecords an error message supplier, which is only evaluated when error messages are enabled.default voidRecords aThrowableobject and an error message supplier, which is only evaluated when error messages are enabled.voidRecords an informational message.voidRecords an informational message and an associated parameter object.default voidRecords an informational message and the associated parameters.voidRecords an informational message, an associated parameter and aThrowableobject.voidRecords an informational message and aThrowableobject.default voidRecords an informational message, the associated parameters and aThrowableobject.default voidRecords an info message supplier, which is only evaluated when info messages are enabled.default voidRecords aThrowableobject and an info message supplier, which is only evaluated when info messages are enabled.booleanReturns true if debug messages are logged.booleanReturns true if error messages are logged.booleanReturns true if informational messages are logged.booleanReturns true if trace messages are logged.booleanReturns true if warning messages are logged.voidRecords a trace message.voidRecords a trace message and an associated parameter object.default voidRecords a trace message and the associated parameters.voidRecords a trace message, an associated parameter and aThrowableobject.voidRecords a trace message and aThrowableobject.default voidRecords a trace message, the associated parameters and aThrowableobject.default voidRecords a trace message supplier, which is only evaluated when trace messages are enabled.default voidRecords aThrowableobject and a trace message supplier, which is only evaluated when trace messages are enabled.voidRecords a warning message.voidRecords a warning message and an associated parameter object.default voidRecords a warning message and the associated parameters.voidRecords a warning message, an associated parameter and aThrowableobject.voidRecords a warning message and aThrowableobject.default voidRecords a warning message, the associated parameters and aThrowableobject.default voidRecords a warning message supplier, which is only evaluated when warning messages are enabled.default voidRecords aThrowableobject 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- theformattedmessage.
-
trace
Records aThrowableobject 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 logformattedmessage.aThrowable- theThrowableobject.- Since:
- 2017.0
-
trace
Records a trace message and aThrowableobject.- Parameters:
aMessage- theformattedmessage.aThrowable- theThrowableobject.
-
trace
Records a trace message and an associated parameter object.- Parameters:
aMessage- theformattedmessage.aParameter- a parameter referenced by the message
-
trace
Records a trace message and the associated parameters.- Parameters:
aMessage- theformattedmessage.aParameters- the parameters referenced by the message- Since:
- 2019.1
-
trace
Records a trace message, an associated parameter and aThrowableobject.- Parameters:
aMessage- theformattedmessage.aParameter- the associated parameter.aThrowable- the associatedThrowable.
-
trace
Records a trace message, the associated parameters and aThrowableobject.- Parameters:
aMessage- theformattedmessage.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- theformattedmessage.
-
debug
Records aThrowableobject 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 logformattedmessage.aThrowable- theThrowableobject.- Since:
- 2017.0
-
debug
Records a debug message and aThrowableobject.- Parameters:
aMessage- theformattedmessage.aThrowable- theThrowableobject.
-
debug
Records a debug message and an associated parameter object.- Parameters:
aMessage- theformattedmessage.aParameter- a parameter referenced by the message
-
debug
Records a debug message and the associated parameters.- Parameters:
aMessage- theformattedmessage.aParameters- the parameters referenced by the message- Since:
- 2019.1
-
debug
Records a debug message, an associated parameter and aThrowableobject.- Parameters:
aMessage- theformattedmessage.aParameter- a parameter referenced by the messageaThrowable- the associatedThrowable.
-
debug
Records a debug message, the associated parameters and aThrowableobject.- Parameters:
aMessage- theformattedmessage.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 aThrowableobject 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 logformattedmessage.aThrowable- theThrowableobject.- Since:
- 2017.0
-
info
Records an informational message and aThrowableobject.- Parameters:
aMessage- theformattedmessage.aThrowable- theThrowableobject.
-
info
Records an informational message and an associated parameter object.- Parameters:
aMessage- theformattedmessage.aParameter- a parameter that can be referenced by the message
-
info
Records an informational message and the associated parameters.- Parameters:
aMessage- theformattedmessage.aParameters- the parameters that can be referenced by the message- Since:
- 2019.1
-
info
Records an informational message, an associated parameter and aThrowableobject.- Parameters:
aMessage- theformattedmessage.aParameter- a parameter that can be referenced by the messageaThrowable- the associatedThrowable.
-
info
Records an informational message, the associated parameters and aThrowableobject.- Parameters:
aMessage- theformattedmessage.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- theformattedmessage.
-
warn
Records aThrowableobject 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 logformattedmessage.aThrowable- theThrowableobject.- Since:
- 2017.0
-
warn
Records a warning message and aThrowableobject.- Parameters:
aMessage- theformattedmessage.aThrowable- theThrowableobject.
-
warn
Records a warning message and an associated parameter object.- Parameters:
aMessage- theformattedmessage.aParameter- a parameter that can be referenced by the message
-
warn
Records a warning message and the associated parameters.- Parameters:
aMessage- theformattedmessage.aParameters- the parameters that can be referenced by the message- Since:
- 2019.1
-
warn
Records a warning message, an associated parameter and aThrowableobject.- Parameters:
aMessage- theformattedmessage.aParameter- a parameter that can be referenced by the messageaThrowable- the associatedThrowable.
-
warn
Records a warning message, the associated parameters and aThrowableobject.- Parameters:
aMessage- theformattedmessage.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- theformattedmessage.
-
error
Records aThrowableobject 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 logformattedmessage.aThrowable- theThrowableobject.- Since:
- 2017.0
-
error
Records an error message and aThrowableobject.- Parameters:
aMessage- theformattedmessage.aThrowable- theThrowableobject.
-
error
Records an error message and an associated parameter object.- Parameters:
aMessage- theformattedmessage.aParameter- a parameter that can be referenced by the message
-
error
Records an error message and the associated parameters.- Parameters:
aMessage- theformattedmessage.aParameters- the parameters that can be referenced by the message- Since:
- 2019.1
-
error
Records an error message, an associated parameter and aThrowableobject.- Parameters:
aMessage- theformattedmessage.aParameter- a parameter that can be referenced by the messageaThrowable- the associatedThrowable.
-
error
Records an error message, the associated parameters and aThrowableobject.- Parameters:
aMessage- theformattedmessage.aThrowable- the associatedThrowable.aParameters- the parameters that can be referenced by the message- Since:
- 2019.1
-