Class CategoryLogger.DelegateLogger

  • Enclosing class:
    CategoryLogger

    public static class CategoryLogger.DelegateLogger
    extends Object
    DelegateLogger class that takes care of actually logging the message and/or exception.

    Copyright (c) 2003-2021 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved.
    BSD-style license. See DJUTILS License.

    Author:
    Alexander Verbraeck
    • Constructor Summary

      Constructors 
      Constructor Description
      DelegateLogger​(boolean log)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void debug​(Object object)
      Create a debug log entry that will always be output, independent of LogCategory settings.
      void debug​(String message)
      Create a debug log entry that will always be output, independent of LogCategory settings.
      void debug​(String message, Object... arguments)
      Create a debug log entry that will always be output, independent of LogCategory settings.
      void debug​(Throwable exception)
      Create a debug log entry that will always be output, independent of LogCategory settings.
      void debug​(Throwable exception, String message)
      Create a debug log entry that will always be output, independent of LogCategory settings.
      void debug​(Throwable exception, String message, Object... arguments)
      Create a debug log entry that will always be output, independent of LogCategory settings.
      void error​(Object object)
      Create a error log entry that will always be output, independent of LogCategory settings.
      void error​(String message)
      Create a error log entry that will always be output, independent of LogCategory settings.
      void error​(String message, Object... arguments)
      Create a error log entry that will always be output, independent of LogCategory settings.
      void error​(Throwable exception)
      Create a error log entry that will always be output, independent of LogCategory settings.
      void error​(Throwable exception, String message)
      Create a error log entry that will always be output, independent of LogCategory settings.
      void error​(Throwable exception, String message, Object... arguments)
      Create a error log entry that will always be output, independent of LogCategory settings.
      void info​(Object object)
      Create a info log entry that will always be output, independent of LogCategory settings.
      void info​(String message)
      Create a info log entry that will always be output, independent of LogCategory settings.
      void info​(String message, Object... arguments)
      Create a info log entry that will always be output, independent of LogCategory settings.
      void info​(Throwable exception)
      Create a info log entry that will always be output, independent of LogCategory settings.
      void info​(Throwable exception, String message)
      Create a info log entry that will always be output, independent of LogCategory settings.
      void info​(Throwable exception, String message, Object... arguments)
      Create a info log entry that will always be output, independent of LogCategory settings.
      void trace​(Object object)
      Create a trace log entry that will always be output, independent of LogCategory settings.
      void trace​(String message)
      Create a trace log entry that will always be output, independent of LogCategory settings.
      void trace​(String message, Object... arguments)
      Create a trace log entry that will always be output, independent of LogCategory settings.
      void trace​(Throwable exception)
      Create a trace log entry that will always be output, independent of LogCategory settings.
      void trace​(Throwable exception, String message)
      Create a trace log entry that will always be output, independent of LogCategory settings.
      void trace​(Throwable exception, String message, Object... arguments)
      Create a trace log entry that will always be output, independent of LogCategory settings.
      void warn​(Object object)
      Create a warn log entry that will always be output, independent of LogCategory settings.
      void warn​(String message)
      Create a warn log entry that will always be output, independent of LogCategory settings.
      void warn​(String message, Object... arguments)
      Create a warn log entry that will always be output, independent of LogCategory settings.
      void warn​(Throwable exception)
      Create a warn log entry that will always be output, independent of LogCategory settings.
      void warn​(Throwable exception, String message)
      Create a warn log entry that will always be output, independent of LogCategory settings.
      void warn​(Throwable exception, String message, Object... arguments)
      Create a warn log entry that will always be output, independent of LogCategory settings.
      CategoryLogger.DelegateLogger when​(boolean condition)
      The conditional filter that will result in the usage of a DelegateLogger.
      CategoryLogger.DelegateLogger when​(BooleanSupplier supplier)
      The conditional filter that will result in the usage of a DelegateLogger.
    • Constructor Detail

      • DelegateLogger

        public DelegateLogger​(boolean log)
        Parameters:
        log - boolean; indicate whether we should log or not.
    • Method Detail

      • when

        public CategoryLogger.DelegateLogger when​(boolean condition)
        The conditional filter that will result in the usage of a DelegateLogger.
        Parameters:
        condition - boolean; the condition that should be evaluated
        Returns:
        the logger that further processes logging (DelegateLogger)
      • when

        public CategoryLogger.DelegateLogger when​(BooleanSupplier supplier)
        The conditional filter that will result in the usage of a DelegateLogger.
        Parameters:
        supplier - BooleanSupplier; the function evaluating the condition
        Returns:
        the logger that further processes logging (DelegateLogger)
      • trace

        public void trace​(Object object)
        Create a trace log entry that will always be output, independent of LogCategory settings.
        Parameters:
        object - Object; the result of the toString() method of object will be logged
      • trace

        public void trace​(String message)
        Create a trace log entry that will always be output, independent of LogCategory settings.
        Parameters:
        message - String; the message to log
      • trace

        public void trace​(String message,
                          Object... arguments)
        Create a trace log entry that will always be output, independent of LogCategory settings.
        Parameters:
        message - String; the message to be logged, where {} entries will be replaced by arguments
        arguments - Object...; the arguments to substitute for the {} entries in the message string
      • trace

        public void trace​(Throwable exception)
        Create a trace log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
      • trace

        public void trace​(Throwable exception,
                          String message)
        Create a trace log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
        message - String; the message to log
      • trace

        public void trace​(Throwable exception,
                          String message,
                          Object... arguments)
        Create a trace log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
        message - String; the message to log, where {} entries will be replaced by arguments
        arguments - Object...; the arguments to substitute for the {} entries in the message string
      • debug

        public void debug​(Object object)
        Create a debug log entry that will always be output, independent of LogCategory settings.
        Parameters:
        object - Object; the result of the toString() method of object will be logged
      • debug

        public void debug​(String message)
        Create a debug log entry that will always be output, independent of LogCategory settings.
        Parameters:
        message - String; the message to log
      • debug

        public void debug​(String message,
                          Object... arguments)
        Create a debug log entry that will always be output, independent of LogCategory settings.
        Parameters:
        message - String; the message to be logged, where {} entries will be replaced by arguments
        arguments - Object...; the arguments to substitute for the {} entries in the message string
      • debug

        public void debug​(Throwable exception)
        Create a debug log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
      • debug

        public void debug​(Throwable exception,
                          String message)
        Create a debug log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
        message - String; the message to log
      • debug

        public void debug​(Throwable exception,
                          String message,
                          Object... arguments)
        Create a debug log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
        message - String; the message to log, where {} entries will be replaced by arguments
        arguments - Object...; the arguments to substitute for the {} entries in the message string
      • info

        public void info​(Object object)
        Create a info log entry that will always be output, independent of LogCategory settings.
        Parameters:
        object - Object; the result of the toString() method of object will be logged
      • info

        public void info​(String message)
        Create a info log entry that will always be output, independent of LogCategory settings.
        Parameters:
        message - String; the message to log
      • info

        public void info​(String message,
                         Object... arguments)
        Create a info log entry that will always be output, independent of LogCategory settings.
        Parameters:
        message - String; the message to be logged, where {} entries will be replaced by arguments
        arguments - Object...; the arguments to substitute for the {} entries in the message string
      • info

        public void info​(Throwable exception)
        Create a info log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
      • info

        public void info​(Throwable exception,
                         String message)
        Create a info log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
        message - String; the message to log
      • info

        public void info​(Throwable exception,
                         String message,
                         Object... arguments)
        Create a info log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
        message - String; the message to log, where {} entries will be replaced by arguments
        arguments - Object...; the arguments to substitute for the {} entries in the message string
      • warn

        public void warn​(Object object)
        Create a warn log entry that will always be output, independent of LogCategory settings.
        Parameters:
        object - Object; the result of the toString() method of object will be logged
      • warn

        public void warn​(String message)
        Create a warn log entry that will always be output, independent of LogCategory settings.
        Parameters:
        message - String; the message to log
      • warn

        public void warn​(String message,
                         Object... arguments)
        Create a warn log entry that will always be output, independent of LogCategory settings.
        Parameters:
        message - String; the message to be logged, where {} entries will be replaced by arguments
        arguments - Object...; the arguments to substitute for the {} entries in the message string
      • warn

        public void warn​(Throwable exception)
        Create a warn log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
      • warn

        public void warn​(Throwable exception,
                         String message)
        Create a warn log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
        message - String; the message to log
      • warn

        public void warn​(Throwable exception,
                         String message,
                         Object... arguments)
        Create a warn log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
        message - String; the message to log, where {} entries will be replaced by arguments
        arguments - Object...; the arguments to substitute for the {} entries in the message string
      • error

        public void error​(Object object)
        Create a error log entry that will always be output, independent of LogCategory settings.
        Parameters:
        object - Object; the result of the toString() method of object will be logged
      • error

        public void error​(String message)
        Create a error log entry that will always be output, independent of LogCategory settings.
        Parameters:
        message - String; the message to log
      • error

        public void error​(String message,
                          Object... arguments)
        Create a error log entry that will always be output, independent of LogCategory settings.
        Parameters:
        message - String; the message to be logged, where {} entries will be replaced by arguments
        arguments - Object...; the arguments to substitute for the {} entries in the message string
      • error

        public void error​(Throwable exception)
        Create a error log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
      • error

        public void error​(Throwable exception,
                          String message)
        Create a error log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
        message - String; the message to log
      • error

        public void error​(Throwable exception,
                          String message,
                          Object... arguments)
        Create a error log entry that will always be output, independent of LogCategory settings.
        Parameters:
        exception - Throwable; the exception to log
        message - String; the message to log, where {} entries will be replaced by arguments
        arguments - Object...; the arguments to substitute for the {} entries in the message string