Interface LoggerDecoratorService.DepthAwareLogger

All Superinterfaces:
Logger
Enclosing class:
LoggerDecoratorService

public static interface LoggerDecoratorService.DepthAwareLogger extends Logger
Because wrapping can change the depth of the logger in the callstack this interface allows loggers to recreate themselves with the proper depth if they support it.
  • Method Details

    • withDepth

      Logger withDepth(int depth)
      Will recreate the logger with desired depth.
      Parameters:
      depth - new depth.
      Returns:
      logger with new depth.
    • withDepth

      static Logger withDepth(Logger logger, int depth)
      Will recreate the logger with desired depth if possible.
      Parameters:
      logger - to check.
      depth - new depth.
      Returns:
      logger with new depth or the same logger if not possible.