Class LoggerFactory.DelegatingLogger

  • All Implemented Interfaces:
    Logger
    Enclosing class:
    LoggerFactory

    private static final class LoggerFactory.DelegatingLogger
    extends java.lang.Object
    implements Logger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String FQCN  
      private java.util.logging.Logger julLogger  
      private java.lang.String name  
    • Constructor Summary

      Constructors 
      Constructor Description
      DelegatingLogger​(java.lang.String name)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void config​(java.lang.Throwable throwable, java.util.function.Supplier<java.lang.String> messageSupplier)
      Log the provided Throwable and message from the provided messageSupplier at config level.
      void config​(java.util.function.Supplier<java.lang.String> messageSupplier)
      Log the message from the provided messageSupplier at config level.
      private java.util.logging.LogRecord createLogRecord​(java.util.logging.Level level, java.lang.Throwable throwable, java.lang.String message)  
      void debug​(java.lang.Throwable throwable, java.util.function.Supplier<java.lang.String> messageSupplier)
      Log the provided Throwable and message from the provided messageSupplier at debug level.
      void debug​(java.util.function.Supplier<java.lang.String> messageSupplier)
      Log the message from the provided messageSupplier at debug level.
      void error​(java.lang.Throwable throwable, java.util.function.Supplier<java.lang.String> messageSupplier)
      Log the provided Throwable and message from the provided messageSupplier at error level.
      void error​(java.util.function.Supplier<java.lang.String> messageSupplier)
      Log the message from the provided messageSupplier at error level.
      void info​(java.lang.Throwable throwable, java.util.function.Supplier<java.lang.String> messageSupplier)
      Log the provided Throwable and message from the provided messageSupplier at info level.
      void info​(java.util.function.Supplier<java.lang.String> messageSupplier)
      Log the message from the provided messageSupplier at info level.
      private void log​(java.util.logging.Level level, java.lang.Throwable throwable, java.util.function.Supplier<java.lang.String> messageSupplier)  
      private static java.lang.String nullSafeGet​(java.util.function.Supplier<java.lang.String> messageSupplier)  
      void trace​(java.lang.Throwable throwable, java.util.function.Supplier<java.lang.String> messageSupplier)
      Log the provided Throwable and message from the provided messageSupplier at trace level.
      void trace​(java.util.function.Supplier<java.lang.String> messageSupplier)
      Log the message from the provided messageSupplier at trace level.
      void warn​(java.lang.Throwable throwable, java.util.function.Supplier<java.lang.String> messageSupplier)
      Log the provided Throwable and message from the provided messageSupplier at warning level.
      void warn​(java.util.function.Supplier<java.lang.String> messageSupplier)
      Log the message from the provided messageSupplier at warning level.
      • Methods inherited from class java.lang.Object

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

      • FQCN

        private static final java.lang.String FQCN
      • name

        private final java.lang.String name
      • julLogger

        private final java.util.logging.Logger julLogger
    • Constructor Detail

      • DelegatingLogger

        DelegatingLogger​(java.lang.String name)
    • Method Detail

      • error

        public void error​(java.util.function.Supplier<java.lang.String> messageSupplier)
        Description copied from interface: Logger
        Log the message from the provided messageSupplier at error level.

        Maps to Level.SEVERE in JUL.

        Specified by:
        error in interface Logger
      • error

        public void error​(java.lang.Throwable throwable,
                          java.util.function.Supplier<java.lang.String> messageSupplier)
        Description copied from interface: Logger
        Log the provided Throwable and message from the provided messageSupplier at error level.

        Maps to Level.SEVERE in JUL.

        Specified by:
        error in interface Logger
      • warn

        public void warn​(java.util.function.Supplier<java.lang.String> messageSupplier)
        Description copied from interface: Logger
        Log the message from the provided messageSupplier at warning level.

        Maps to Level.WARNING in JUL.

        Specified by:
        warn in interface Logger
      • warn

        public void warn​(java.lang.Throwable throwable,
                         java.util.function.Supplier<java.lang.String> messageSupplier)
        Description copied from interface: Logger
        Log the provided Throwable and message from the provided messageSupplier at warning level.

        Maps to Level.WARNING in JUL.

        Specified by:
        warn in interface Logger
      • info

        public void info​(java.util.function.Supplier<java.lang.String> messageSupplier)
        Description copied from interface: Logger
        Log the message from the provided messageSupplier at info level.

        Maps to Level.INFO in JUL.

        Specified by:
        info in interface Logger
      • info

        public void info​(java.lang.Throwable throwable,
                         java.util.function.Supplier<java.lang.String> messageSupplier)
        Description copied from interface: Logger
        Log the provided Throwable and message from the provided messageSupplier at info level.

        Maps to Level.INFO in JUL.

        Specified by:
        info in interface Logger
      • config

        public void config​(java.util.function.Supplier<java.lang.String> messageSupplier)
        Description copied from interface: Logger
        Log the message from the provided messageSupplier at config level.

        Maps to Level.CONFIG in JUL.

        Specified by:
        config in interface Logger
      • config

        public void config​(java.lang.Throwable throwable,
                           java.util.function.Supplier<java.lang.String> messageSupplier)
        Description copied from interface: Logger
        Log the provided Throwable and message from the provided messageSupplier at config level.

        Maps to Level.CONFIG in JUL.

        Specified by:
        config in interface Logger
      • debug

        public void debug​(java.util.function.Supplier<java.lang.String> messageSupplier)
        Description copied from interface: Logger
        Log the message from the provided messageSupplier at debug level.

        Maps to Level.FINE in JUL.

        Specified by:
        debug in interface Logger
      • debug

        public void debug​(java.lang.Throwable throwable,
                          java.util.function.Supplier<java.lang.String> messageSupplier)
        Description copied from interface: Logger
        Log the provided Throwable and message from the provided messageSupplier at debug level.

        Maps to Level.FINE in JUL.

        Specified by:
        debug in interface Logger
      • trace

        public void trace​(java.util.function.Supplier<java.lang.String> messageSupplier)
        Description copied from interface: Logger
        Log the message from the provided messageSupplier at trace level.

        Maps to Level.FINER in JUL.

        Specified by:
        trace in interface Logger
      • trace

        public void trace​(java.lang.Throwable throwable,
                          java.util.function.Supplier<java.lang.String> messageSupplier)
        Description copied from interface: Logger
        Log the provided Throwable and message from the provided messageSupplier at trace level.

        Maps to Level.FINER in JUL.

        Specified by:
        trace in interface Logger
      • log

        private void log​(java.util.logging.Level level,
                         java.lang.Throwable throwable,
                         java.util.function.Supplier<java.lang.String> messageSupplier)
      • createLogRecord

        private java.util.logging.LogRecord createLogRecord​(java.util.logging.Level level,
                                                            java.lang.Throwable throwable,
                                                            java.lang.String message)
      • nullSafeGet

        private static java.lang.String nullSafeGet​(java.util.function.Supplier<java.lang.String> messageSupplier)