Class Slf4jRuntimeLogger

  • All Implemented Interfaces:
    org.refcodes.logger.LogPriorityAccessor, org.refcodes.logger.MessageLogger<org.refcodes.logger.LogPriority>, org.refcodes.logger.RuntimeLogger, org.refcodes.mixin.NameAccessor, org.refcodes.mixin.NameAccessor.NameMutator, org.refcodes.mixin.NameAccessor.NameProperty


    public class Slf4jRuntimeLogger
    extends java.lang.Object
    implements org.refcodes.logger.RuntimeLogger, org.refcodes.mixin.NameAccessor.NameProperty
    Alternate implementation of the RuntimeLogger to log using SLF4J.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.refcodes.logger.LogPriorityAccessor

        org.refcodes.logger.LogPriorityAccessor.LogPriorityMutator, org.refcodes.logger.LogPriorityAccessor.LogPriorityProperty
      • Nested classes/interfaces inherited from interface org.refcodes.mixin.NameAccessor

        org.refcodes.mixin.NameAccessor.NameBuilder<B extends org.refcodes.mixin.NameAccessor.NameBuilder<B>>, org.refcodes.mixin.NameAccessor.NameMutator, org.refcodes.mixin.NameAccessor.NameProperty
    • Field Summary

      • Fields inherited from interface org.refcodes.logger.RuntimeLogger

        ROOT_LOGGER_ELEMENT_PATH, RUNTIME_LOGGER_CONFIG
    • Constructor Summary

      Constructors 
      Constructor Description
      Slf4jRuntimeLogger​()
      In case the Slf4jRuntimeLogger (as created by the Slf4jRuntimeLoggerFactorySingleton) detects that SLF4J has bound a SLF4J RuntimeLoggerAdapterImpl (see refcodes-logger-ext-slf4j, the REFCODES.ORG SLF4J binding) (i.e. the REFCODES.ORG SLF4J binding), it directly delegates its method calls to the wrapped RuntimeLogger instead of marshaling a log request through the SLF4J RuntimeLoggerAdapterImpl; as marshaling would mean consolidating of various detailed LogPriority levels to a single SLF4J log level.
      Slf4jRuntimeLogger​(org.slf4j.Logger aLogger)
      In case the Slf4jRuntimeLogger (as created by the Slf4jRuntimeLoggerFactorySingleton) detects that SLF4J has bound a SLF4J RuntimeLoggerAdapterImpl (see refcodes-logger-ext-slf4j, the REFCODES.ORG SLF4J binding), it directly delegates its method calls to the wrapped RuntimeLogger instead of marshaling a log request through the SLF4J RuntimeLoggerAdapterImpl as marshaling would mean consolidating of various detailed LogPriority levels to a single SLF4J log level.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void alert​(java.lang.String aMessage)
      void alert​(java.lang.String aMessage, java.lang.Object... aArguments)
      void alert​(java.lang.String aMessage, java.lang.Throwable aThrowable)
      void alert​(java.lang.String aMessage, java.lang.Throwable aThrowable, java.lang.Object... aArguments)
      void critical​(java.lang.String aMessage)
      void critical​(java.lang.String aMessage, java.lang.Object... aArguments)
      void critical​(java.lang.String aMessage, java.lang.Throwable aThrowable)
      void critical​(java.lang.String aMessage, java.lang.Throwable aThrowable, java.lang.Object... aArguments)
      void debug​(java.lang.String aMessage)
      void debug​(java.lang.String aMessage, java.lang.Object... aArguments)
      void error​(java.lang.String aMessage)
      void error​(java.lang.String aMessage, java.lang.Object... aArguments)
      void error​(java.lang.String aMessage, java.lang.Throwable aThrowable)
      void error​(java.lang.String aMessage, java.lang.Throwable aThrowable, java.lang.Object... aArguments)
      org.refcodes.logger.LogPriority getLogPriority​()
      java.lang.String getName​()
      void info​(java.lang.String aMessage)
      void info​(java.lang.String aMessage, java.lang.Object... aArguments)
      boolean isLog​(org.refcodes.logger.LogPriority aPriority)
      boolean isLogAlert​()
      boolean isLogCritical​()
      boolean isLogDebug​()
      boolean isLogError​()
      boolean isLogInfo​()
      boolean isLogNotice​()
      boolean isLogPanic​()
      boolean isLogTrace​()
      boolean isLogWarn​()
      void log​(org.refcodes.logger.LogPriority aPriority, java.lang.String aMessage)
      void log​(org.refcodes.logger.LogPriority aPriority, java.lang.String aMessage, java.lang.Object... aArguments)
      void log​(org.refcodes.logger.LogPriority aPriority, java.lang.String aMessage, java.lang.Throwable aThrowable)
      void log​(org.refcodes.logger.LogPriority aPriority, java.lang.String aMessage, java.lang.Throwable aThrowable, java.lang.Object... aArguments)
      void notice​(java.lang.String aMessage)
      void notice​(java.lang.String aMessage, java.lang.Object... aArguments)
      void panic​(java.lang.String aMessage)
      void panic​(java.lang.String aMessage, java.lang.Object... aArguments)
      void panic​(java.lang.String aMessage, java.lang.Throwable aThrowable)
      void panic​(java.lang.String aMessage, java.lang.Throwable aThrowable, java.lang.Object... aArguments)
      void setName​(java.lang.String aName)
      void trace​(java.lang.String aMessage)
      void trace​(java.lang.String aMessage, java.lang.Object... aArguments)
      void warn​(java.lang.String aMessage)
      void warn​(java.lang.String aMessage, java.lang.Object... aArguments)
      void warn​(java.lang.String aMessage, java.lang.Throwable aThrowable)
      void warn​(java.lang.String aMessage, java.lang.Throwable aThrowable, java.lang.Object... aArguments)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.refcodes.logger.RuntimeLogger

        printSeparator
    • Constructor Detail

      • Slf4jRuntimeLogger

        public Slf4jRuntimeLogger​()
        In case the Slf4jRuntimeLogger (as created by the Slf4jRuntimeLoggerFactorySingleton) detects that SLF4J has bound a SLF4J RuntimeLoggerAdapterImpl (see refcodes-logger-ext-slf4j, the REFCODES.ORG SLF4J binding) (i.e. the REFCODES.ORG SLF4J binding), it directly delegates its method calls to the wrapped RuntimeLogger instead of marshaling a log request through the SLF4J RuntimeLoggerAdapterImpl; as marshaling would mean consolidating of various detailed LogPriority levels to a single SLF4J log level.
      • Slf4jRuntimeLogger

        public Slf4jRuntimeLogger​(org.slf4j.Logger aLogger)
        In case the Slf4jRuntimeLogger (as created by the Slf4jRuntimeLoggerFactorySingleton) detects that SLF4J has bound a SLF4J RuntimeLoggerAdapterImpl (see refcodes-logger-ext-slf4j, the REFCODES.ORG SLF4J binding), it directly delegates its method calls to the wrapped RuntimeLogger instead of marshaling a log request through the SLF4J RuntimeLoggerAdapterImpl as marshaling would mean consolidating of various detailed LogPriority levels to a single SLF4J log level.
        Parameters:
        aLogger - the logger to use SLF4J for logging.
    • Method Detail

      • log

        public void log​(org.refcodes.logger.LogPriority aPriority,
                        java.lang.String aMessage)
        Specified by:
        log in interface org.refcodes.logger.MessageLogger<org.refcodes.logger.LogPriority>
      • log

        public void log​(org.refcodes.logger.LogPriority aPriority,
                        java.lang.String aMessage,
                        java.lang.Object... aArguments)
        Specified by:
        log in interface org.refcodes.logger.MessageLogger<org.refcodes.logger.LogPriority>
      • getName

        public java.lang.String getName​()
        Specified by:
        getName in interface org.refcodes.mixin.NameAccessor
      • setName

        public void setName​(java.lang.String aName)
        Specified by:
        setName in interface org.refcodes.mixin.NameAccessor.NameMutator
      • getLogPriority

        public org.refcodes.logger.LogPriority getLogPriority​()
        Specified by:
        getLogPriority in interface org.refcodes.logger.LogPriorityAccessor
      • log

        public void log​(org.refcodes.logger.LogPriority aPriority,
                        java.lang.String aMessage,
                        java.lang.Throwable aThrowable)
        Specified by:
        log in interface org.refcodes.logger.RuntimeLogger
      • log

        public void log​(org.refcodes.logger.LogPriority aPriority,
                        java.lang.String aMessage,
                        java.lang.Throwable aThrowable,
                        java.lang.Object... aArguments)
        Specified by:
        log in interface org.refcodes.logger.RuntimeLogger
      • isLog

        public boolean isLog​(org.refcodes.logger.LogPriority aPriority)
        Specified by:
        isLog in interface org.refcodes.logger.RuntimeLogger
      • trace

        public void trace​(java.lang.String aMessage)
        Specified by:
        trace in interface org.refcodes.logger.RuntimeLogger
      • trace

        public void trace​(java.lang.String aMessage,
                          java.lang.Object... aArguments)
        Specified by:
        trace in interface org.refcodes.logger.RuntimeLogger
      • isLogTrace

        public boolean isLogTrace​()
        Specified by:
        isLogTrace in interface org.refcodes.logger.RuntimeLogger
      • debug

        public void debug​(java.lang.String aMessage)
        Specified by:
        debug in interface org.refcodes.logger.RuntimeLogger
      • debug

        public void debug​(java.lang.String aMessage,
                          java.lang.Object... aArguments)
        Specified by:
        debug in interface org.refcodes.logger.RuntimeLogger
      • isLogDebug

        public boolean isLogDebug​()
        Specified by:
        isLogDebug in interface org.refcodes.logger.RuntimeLogger
      • info

        public void info​(java.lang.String aMessage)
        Specified by:
        info in interface org.refcodes.logger.RuntimeLogger
      • info

        public void info​(java.lang.String aMessage,
                         java.lang.Object... aArguments)
        Specified by:
        info in interface org.refcodes.logger.RuntimeLogger
      • isLogInfo

        public boolean isLogInfo​()
        Specified by:
        isLogInfo in interface org.refcodes.logger.RuntimeLogger
      • notice

        public void notice​(java.lang.String aMessage)
        Specified by:
        notice in interface org.refcodes.logger.RuntimeLogger
      • notice

        public void notice​(java.lang.String aMessage,
                           java.lang.Object... aArguments)
        Specified by:
        notice in interface org.refcodes.logger.RuntimeLogger
      • isLogNotice

        public boolean isLogNotice​()
        Specified by:
        isLogNotice in interface org.refcodes.logger.RuntimeLogger
      • warn

        public void warn​(java.lang.String aMessage)
        Specified by:
        warn in interface org.refcodes.logger.RuntimeLogger
      • warn

        public void warn​(java.lang.String aMessage,
                         java.lang.Object... aArguments)
        Specified by:
        warn in interface org.refcodes.logger.RuntimeLogger
      • warn

        public void warn​(java.lang.String aMessage,
                         java.lang.Throwable aThrowable)
        Specified by:
        warn in interface org.refcodes.logger.RuntimeLogger
      • warn

        public void warn​(java.lang.String aMessage,
                         java.lang.Throwable aThrowable,
                         java.lang.Object... aArguments)
        Specified by:
        warn in interface org.refcodes.logger.RuntimeLogger
      • isLogWarn

        public boolean isLogWarn​()
        Specified by:
        isLogWarn in interface org.refcodes.logger.RuntimeLogger
      • error

        public void error​(java.lang.String aMessage)
        Specified by:
        error in interface org.refcodes.logger.RuntimeLogger
      • error

        public void error​(java.lang.String aMessage,
                          java.lang.Object... aArguments)
        Specified by:
        error in interface org.refcodes.logger.RuntimeLogger
      • error

        public void error​(java.lang.String aMessage,
                          java.lang.Throwable aThrowable)
        Specified by:
        error in interface org.refcodes.logger.RuntimeLogger
      • error

        public void error​(java.lang.String aMessage,
                          java.lang.Throwable aThrowable,
                          java.lang.Object... aArguments)
        Specified by:
        error in interface org.refcodes.logger.RuntimeLogger
      • isLogError

        public boolean isLogError​()
        Specified by:
        isLogError in interface org.refcodes.logger.RuntimeLogger
      • critical

        public void critical​(java.lang.String aMessage)
        Specified by:
        critical in interface org.refcodes.logger.RuntimeLogger
      • critical

        public void critical​(java.lang.String aMessage,
                             java.lang.Object... aArguments)
        Specified by:
        critical in interface org.refcodes.logger.RuntimeLogger
      • critical

        public void critical​(java.lang.String aMessage,
                             java.lang.Throwable aThrowable)
        Specified by:
        critical in interface org.refcodes.logger.RuntimeLogger
      • critical

        public void critical​(java.lang.String aMessage,
                             java.lang.Throwable aThrowable,
                             java.lang.Object... aArguments)
        Specified by:
        critical in interface org.refcodes.logger.RuntimeLogger
      • isLogCritical

        public boolean isLogCritical​()
        Specified by:
        isLogCritical in interface org.refcodes.logger.RuntimeLogger
      • alert

        public void alert​(java.lang.String aMessage)
        Specified by:
        alert in interface org.refcodes.logger.RuntimeLogger
      • alert

        public void alert​(java.lang.String aMessage,
                          java.lang.Object... aArguments)
        Specified by:
        alert in interface org.refcodes.logger.RuntimeLogger
      • alert

        public void alert​(java.lang.String aMessage,
                          java.lang.Throwable aThrowable)
        Specified by:
        alert in interface org.refcodes.logger.RuntimeLogger
      • alert

        public void alert​(java.lang.String aMessage,
                          java.lang.Throwable aThrowable,
                          java.lang.Object... aArguments)
        Specified by:
        alert in interface org.refcodes.logger.RuntimeLogger
      • isLogAlert

        public boolean isLogAlert​()
        Specified by:
        isLogAlert in interface org.refcodes.logger.RuntimeLogger
      • panic

        public void panic​(java.lang.String aMessage)
        Specified by:
        panic in interface org.refcodes.logger.RuntimeLogger
      • panic

        public void panic​(java.lang.String aMessage,
                          java.lang.Object... aArguments)
        Specified by:
        panic in interface org.refcodes.logger.RuntimeLogger
      • panic

        public void panic​(java.lang.String aMessage,
                          java.lang.Throwable aThrowable)
        Specified by:
        panic in interface org.refcodes.logger.RuntimeLogger
      • panic

        public void panic​(java.lang.String aMessage,
                          java.lang.Throwable aThrowable,
                          java.lang.Object... aArguments)
        Specified by:
        panic in interface org.refcodes.logger.RuntimeLogger
      • isLogPanic

        public boolean isLogPanic​()
        Specified by:
        isLogPanic in interface org.refcodes.logger.RuntimeLogger