- All Known Implementing Classes:
ConsoleLogging.ConsoleLogger
,DevNullLogger
,JULogger
,PrefixedLogger
,ReformattedLogger
Some methods in this interface take a message template together with a list of parameters. These methods are expected to construct the final
message only if the needed logging level is enabled. Driver expects formatting to be done using String.format(String, Object...)
method.
Thus, all supplied message templates will contain "%s" as parameter placeholders. This is different from all SLF4J-compatible logging frameworks
where parameter placeholder is "{}". Implementations of this interface should adapt placeholders from "%s" to "{}", if required.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Logs bolt messages sent and received by this driver.void
Logs debug message with throwable.void
Logs errors from this driver.void
Logs information from the driver.boolean
Return true if the debug level is enabled.boolean
Return true if the trace logging level is enabled.void
Logs binary sent and received by this driver.void
Logs warnings that happened when using the driver.void
Logs warnings that happened during using the driver
-
Method Details
-
error
Logs errors from this driver.Examples of errors logged using this method:
- Network connection errors
- DNS resolution errors
- Cluster discovery errors
- Parameters:
message
- the error message.cause
- the cause of the error.
-
info
Logs information from the driver.Example of info messages logged using this method:
- Driver creation and shutdown
- Cluster discovery progress
- Parameters:
message
- the information message template. Can containString.format(String, Object...)
-style placeholders, like "%s".params
- parameters used in the information message.
-
warn
Logs warnings that happened when using the driver.Example of info messages logged using this method:
- Usage of deprecated APIs
- Transaction retry failures
- Parameters:
message
- the warning message template. Can containString.format(String, Object...)
-style placeholders, like "%s".params
- parameters used in the warning message.
-
warn
Logs warnings that happened during using the driverExample of info messages logged using this method:
- Usage of deprecated APIs
- Transaction retry failures
- Parameters:
message
- the warning messagecause
- the cause of the warning
-
debug
Logs bolt messages sent and received by this driver. It is only enabled whenisDebugEnabled()
returnstrue
. This logging level generates a lot of log entries.Example of debug messages logged using this method:
- Connection pool events, like creation, acquire and release of connections
- Messages sent to the database
- Messages received from the database
- Parameters:
message
- the debug message template. Can containString.format(String, Object...)
-style placeholders, like "%s".params
- parameters used in generating the bolt message
-
debug
Logs debug message with throwable.- Parameters:
message
- the message to logthrowable
- the throwable to include into the log entry
-
trace
Logs binary sent and received by this driver. It is only enabled whenisTraceEnabled()
returnstrue
. This logging level generates huge amount of log entries.Example of debug messages logged using this method:
- Idle connection pings
- Server selection for load balancing
- Messages sent to the database with bytes in hex
- Messages received from the database with bytes in hex
- Parameters:
message
- the trace message template. Can containString.format(String, Object...)
-style placeholders, like "%s".params
- parameters used in generating the hex message
-
isTraceEnabled
boolean isTraceEnabled()Return true if the trace logging level is enabled.- Returns:
- true if the trace logging level is enabled.
- See Also:
-
isDebugEnabled
boolean isDebugEnabled()Return true if the debug level is enabled.- Returns:
- true if the debug level is enabled.
- See Also:
-