Class Slf4jRuntimeLogger

  • All Implemented Interfaces:
    org.refcodes.logger.LogDecorator, 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 Object
    implements org.refcodes.logger.RuntimeLogger, org.refcodes.mixin.NameAccessor.NameProperty
    Alternate implementation of the RuntimeLogger to log using SLF4J.
    • 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,
                        String aMessage)
        Specified by:
        log in interface org.refcodes.logger.MessageLogger<org.refcodes.logger.LogPriority>
      • log

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

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

        public void setName​(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,
                        String aMessage,
                        Throwable aThrowable)
        Specified by:
        log in interface org.refcodes.logger.RuntimeLogger
      • log

        public void log​(org.refcodes.logger.LogPriority aPriority,
                        String aMessage,
                        Throwable aThrowable,
                        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​(String aMessage)
        Specified by:
        trace in interface org.refcodes.logger.RuntimeLogger
      • trace

        public void trace​(String aMessage,
                          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​(String aMessage)
        Specified by:
        debug in interface org.refcodes.logger.RuntimeLogger
      • debug

        public void debug​(String aMessage,
                          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​(String aMessage)
        Specified by:
        info in interface org.refcodes.logger.RuntimeLogger
      • info

        public void info​(String aMessage,
                         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​(String aMessage)
        Specified by:
        notice in interface org.refcodes.logger.RuntimeLogger
      • notice

        public void notice​(String aMessage,
                           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​(String aMessage)
        Specified by:
        warn in interface org.refcodes.logger.RuntimeLogger
      • warn

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

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

        public void warn​(String aMessage,
                         Throwable aThrowable,
                         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​(String aMessage)
        Specified by:
        error in interface org.refcodes.logger.RuntimeLogger
      • error

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

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

        public void error​(String aMessage,
                          Throwable aThrowable,
                          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​(String aMessage)
        Specified by:
        critical in interface org.refcodes.logger.RuntimeLogger
      • critical

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

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

        public void critical​(String aMessage,
                             Throwable aThrowable,
                             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​(String aMessage)
        Specified by:
        alert in interface org.refcodes.logger.RuntimeLogger
      • alert

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

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

        public void alert​(String aMessage,
                          Throwable aThrowable,
                          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​(String aMessage)
        Specified by:
        panic in interface org.refcodes.logger.RuntimeLogger
      • panic

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

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

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

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