Class Loggings

java.lang.Object
io.debezium.util.Loggings

public class Loggings extends Object
Functionality for dealing with logging.
Author:
Chris Cranford
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final org.slf4j.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    logDebugAndTraceRecord(org.slf4j.Logger logger, Object record, String message, Object... arguments)
    Log a debug message and explicitly append the source of the debug entry as a separate log entry that uses trace logging to prevent unintended leaking of sensitive data.
    static void
    logErrorAndTraceRecord(org.slf4j.Logger logger, Object record, String message, Object... arguments)
    Log an error message and explicitly append the source of the error entry as a separate log entry that uses trace logging to prevent unintended leaking of sensitive data.
    static void
    logErrorAndTraceRecord(org.slf4j.Logger logger, Object record, String message, Throwable t)
    Log an error message and explicitly append the source of the error entry as a separate log entry that uses trace logging to prevent unintended leaking of sensitive data.
    static void
    logWarningAndTraceRecord(org.slf4j.Logger logger, Object record, String message, Object... arguments)
    Log a warning message and explicitly append the source of the warning as a separate log entry that uses trace logging to prevent unintended leaking of sensitive data.
    static Object
    Redact sensitive data in the log entry if sensitive logging is not enabled.
    static Object
    Redact sensitive data in the log entry if sensitive logging is not enabled.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
  • Constructor Details

    • Loggings

      public Loggings()
  • Method Details

    • logWarningAndTraceRecord

      public static void logWarningAndTraceRecord(org.slf4j.Logger logger, Object record, String message, Object... arguments)
      Log a warning message and explicitly append the source of the warning as a separate log entry that uses trace logging to prevent unintended leaking of sensitive data.
      Parameters:
      logger - the logger instance
      record - the record the log entry is based upon
      message - the warning message to be logged
      arguments - the arguments passed to the warning message
    • logDebugAndTraceRecord

      public static void logDebugAndTraceRecord(org.slf4j.Logger logger, Object record, String message, Object... arguments)
      Log a debug message and explicitly append the source of the debug entry as a separate log entry that uses trace logging to prevent unintended leaking of sensitive data.
      Parameters:
      logger - the logger instance
      record - the record the log entry is based upon
      message - the debug message to be logged
      arguments - the arguments passed to the debug message
    • logErrorAndTraceRecord

      public static void logErrorAndTraceRecord(org.slf4j.Logger logger, Object record, String message, Object... arguments)
      Log an error message and explicitly append the source of the error entry as a separate log entry that uses trace logging to prevent unintended leaking of sensitive data.
      Parameters:
      logger - the logger instance
      record - the record the log entry is based upon
      message - the error message to be logged
      arguments - the arguments passed to the error message
    • logErrorAndTraceRecord

      public static void logErrorAndTraceRecord(org.slf4j.Logger logger, Object record, String message, Throwable t)
      Log an error message and explicitly append the source of the error entry as a separate log entry that uses trace logging to prevent unintended leaking of sensitive data.
      Parameters:
      logger - the logger instance
      record - the record the log entry is based upon
      message - the error message to be logged
      t - the exception that caused the error
    • maybeRedactSensitiveData

      public static Object maybeRedactSensitiveData(Object value)
      Redact sensitive data in the log entry if sensitive logging is not enabled.
      Parameters:
      value - the value to be redacted
      Returns:
      the redacted value if sensitive logging is not enabled, otherwise the original value
    • maybeRedactSensitiveData

      public static Object maybeRedactSensitiveData(Object[] value)
      Redact sensitive data in the log entry if sensitive logging is not enabled.
      Parameters:
      value - the value to be redacted
      Returns:
      the redacted value if sensitive logging is not enabled, otherwise the original value