Class DurableLogger

java.lang.Object
software.amazon.lambda.durable.logging.DurableLogger

public class DurableLogger extends Object
Logger wrapper that adds durable execution context to log entries via MDC and optionally suppresses logs during replay.
  • Constructor Details

    • DurableLogger

      public DurableLogger(org.slf4j.Logger delegate, BaseContextImpl context)
      Creates a DurableLogger wrapping the given SLF4J logger with execution context MDC entries.
      Parameters:
      delegate - the SLF4J logger to wrap
      context - the durable execution context providing MDC values
  • Method Details

    • close

      public void close()
      Clears all MDC entries. User set MDC entries will also be removed as the thread will not be used anymore.
    • trace

      public void trace(String format, Object... args)
    • debug

      public void debug(String format, Object... args)
    • info

      public void info(String format, Object... args)
    • warn

      public void warn(String format, Object... args)
    • error

      public void error(String format, Object... args)
    • error

      public void error(String message, Throwable t)