Class ReformattedLogger

java.lang.Object
org.neo4j.driver.internal.logging.ReformattedLogger
All Implemented Interfaces:
Logger
Direct Known Subclasses:
PrefixedLogger

public abstract class ReformattedLogger extends Object implements Logger
  • Constructor Details

    • ReformattedLogger

      protected ReformattedLogger(Logger delegate)
  • Method Details

    • error

      public void error(String message, Throwable cause)
      Description copied from interface: Logger
      Logs errors from this driver.

      Examples of errors logged using this method:

      • Network connection errors
      • DNS resolution errors
      • Cluster discovery errors
      Specified by:
      error in interface Logger
      Parameters:
      message - the error message.
      cause - the cause of the error.
    • info

      public void info(String message, Object... params)
      Description copied from interface: Logger
      Logs information from the driver.

      Example of info messages logged using this method:

      • Driver creation and shutdown
      • Cluster discovery progress
      Specified by:
      info in interface Logger
      Parameters:
      message - the information message template. Can contain String.format(String, Object...)-style placeholders, like "%s".
      params - parameters used in the information message.
    • warn

      public void warn(String message, Object... params)
      Description copied from interface: Logger
      Logs warnings that happened when using the driver.

      Example of info messages logged using this method:

      • Usage of deprecated APIs
      • Transaction retry failures
      Specified by:
      warn in interface Logger
      Parameters:
      message - the warning message template. Can contain String.format(String, Object...)-style placeholders, like "%s".
      params - parameters used in the warning message.
    • warn

      public void warn(String message, Throwable cause)
      Description copied from interface: Logger
      Logs warnings that happened during using the driver

      Example of info messages logged using this method:

      • Usage of deprecated APIs
      • Transaction retry failures
      Specified by:
      warn in interface Logger
      Parameters:
      message - the warning message
      cause - the cause of the warning
    • debug

      public void debug(String message, Object... params)
      Description copied from interface: Logger
      Logs bolt messages sent and received by this driver. It is only enabled when Logger.isDebugEnabled() returns true. 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
      Specified by:
      debug in interface Logger
      Parameters:
      message - the debug message template. Can contain String.format(String, Object...)-style placeholders, like "%s".
      params - parameters used in generating the bolt message
    • debug

      public void debug(String message, Throwable throwable)
      Description copied from interface: Logger
      Logs debug message with throwable.
      Specified by:
      debug in interface Logger
      Parameters:
      message - the message to log
      throwable - the throwable to include into the log entry
    • trace

      public void trace(String message, Object... params)
      Description copied from interface: Logger
      Logs binary sent and received by this driver. It is only enabled when Logger.isTraceEnabled() returns true. 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
      Specified by:
      trace in interface Logger
      Parameters:
      message - the trace message template. Can contain String.format(String, Object...)-style placeholders, like "%s".
      params - parameters used in generating the hex message
    • isTraceEnabled

      public boolean isTraceEnabled()
      Description copied from interface: Logger
      Return true if the trace logging level is enabled.
      Specified by:
      isTraceEnabled in interface Logger
      Returns:
      true if the trace logging level is enabled.
      See Also:
    • isDebugEnabled

      public boolean isDebugEnabled()
      Description copied from interface: Logger
      Return true if the debug level is enabled.
      Specified by:
      isDebugEnabled in interface Logger
      Returns:
      true if the debug level is enabled.
      See Also:
    • reformat

      protected abstract String reformat(String message)