Class SpringRuntimeLoggerSingleton

  • All Implemented Interfaces:
    org.refcodes.logger.LoggerAccessor.LoggerMutator<org.refcodes.logger.Logger<java.lang.Object>>, org.refcodes.logger.LogPriorityAccessor, org.refcodes.logger.LogPriorityAccessor.LogPriorityMutator, org.refcodes.logger.MessageLogger<org.refcodes.logger.LogPriority>, org.refcodes.logger.RuntimeLogger, org.refcodes.mixin.NameAccessor, org.refcodes.mixin.NameAccessor.NameMutator

    public class SpringRuntimeLoggerSingleton
    extends org.refcodes.logger.RuntimeLoggerImpl
    Less flexible shortcut for the class RuntimeLoggerSingleton. The SpringRuntimeLoggerSingleton provides a RuntimeLogger singleton from the class specified in the bean RUNTIME_LOGGER_BEAN declared by the context file RUNTIME_LOGGER_CONTEXT.
    • 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 
      Modifier and Type Field Description
      static java.lang.String RUNTIME_LOGGER_BEAN
      The default Spring bean name for a refcodes RuntimeLogger bean.
      static java.lang.String RUNTIME_LOGGER_CONTEXT
      The filename of the file on the classpath containing the spring context for the runtime logger.
      • Fields inherited from interface org.refcodes.logger.RuntimeLogger

        ROOT_LOGGER_ELEMENT_PATH, RUNTIME_LOGGER_CONFIG
      • Fields inherited from class org.refcodes.logger.RuntimeLoggerImpl

        DEFAULT_LOG_PRIORITY, ROOT_LOGGER_NAME
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SpringRuntimeLoggerSingleton​(org.refcodes.logger.Logger<java.lang.Object> aLogger, org.refcodes.logger.LogPriority aPriority)
      Instantiates a new spring runtime logger singleton.
    • Method Summary

      All Methods Static 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)
      static org.refcodes.logger.RuntimeLogger getInstance()
      Returns the singleton's instance as fabricated by this SpringRuntimeLoggerSingleton.
      static org.refcodes.logger.RuntimeLogger getInstance​(java.lang.String aLoggerBeanId)
      Returns the singleton's instance as fabricated by this SpringRuntimeLoggerSingleton.
      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 aMarker, java.lang.String aMessage)
      void log​(org.refcodes.logger.LogPriority aMarker, 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 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 class org.refcodes.logger.RuntimeLoggerImpl

        doLog, getCallerStackTraceElement, printSeparator, setLogger, setLogLevel, setLogPriority, setName
    • Field Detail

      • RUNTIME_LOGGER_BEAN

        public static java.lang.String RUNTIME_LOGGER_BEAN
        The default Spring bean name for a refcodes RuntimeLogger bean.
      • RUNTIME_LOGGER_CONTEXT

        public static final java.lang.String RUNTIME_LOGGER_CONTEXT
        The filename of the file on the classpath containing the spring context for the runtime logger.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SpringRuntimeLoggerSingleton

        protected SpringRuntimeLoggerSingleton​(org.refcodes.logger.Logger<java.lang.Object> aLogger,
                                               org.refcodes.logger.LogPriority aPriority)
        Instantiates a new spring runtime logger singleton.
        Parameters:
        aLogger - the logger
        aPriority - the priority
    • Method Detail

      • getInstance

        public static org.refcodes.logger.RuntimeLogger getInstance()
                                                             throws org.refcodes.logger.LoggerInstantiationRuntimeException
        Returns the singleton's instance as fabricated by this SpringRuntimeLoggerSingleton.
        Returns:
        The RuntimeLogger singleton's instance.
        Throws:
        org.refcodes.logger.LoggerInstantiationRuntimeException - Thrown in case instantiating a Logger (RuntimeLogger) failed
      • getInstance

        public static org.refcodes.logger.RuntimeLogger getInstance​(java.lang.String aLoggerBeanId)
                                                             throws org.refcodes.logger.LoggerInstantiationRuntimeException
        Returns the singleton's instance as fabricated by this SpringRuntimeLoggerSingleton.
        Parameters:
        aLoggerBeanId - The logger's bean ID as defined in the according RUNTIME_LOGGER_CONTEXT Spring context file.
        Returns:
        The RuntimeLogger singleton's instance.
        Throws:
        org.refcodes.logger.LoggerInstantiationRuntimeException - Thrown in case instantiating a Logger (RuntimeLogger) failed
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.refcodes.mixin.NameAccessor
        Overrides:
        getName in class org.refcodes.logger.RuntimeLoggerImpl
      • getLogPriority

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

        public void log​(org.refcodes.logger.LogPriority aMarker,
                        java.lang.String aMessage)
        Specified by:
        log in interface org.refcodes.logger.MessageLogger<org.refcodes.logger.LogPriority>
        Overrides:
        log in class org.refcodes.logger.RuntimeLoggerImpl
      • 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
        Overrides:
        log in class org.refcodes.logger.RuntimeLoggerImpl
      • log

        public void log​(org.refcodes.logger.LogPriority aMarker,
                        java.lang.String aMessage,
                        java.lang.Object... aArguments)
        Specified by:
        log in interface org.refcodes.logger.MessageLogger<org.refcodes.logger.LogPriority>
        Overrides:
        log in class org.refcodes.logger.RuntimeLoggerImpl
      • 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
        Overrides:
        log in class org.refcodes.logger.RuntimeLoggerImpl
      • isLog

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public boolean isLogPanic()
        Specified by:
        isLogPanic in interface org.refcodes.logger.RuntimeLogger
        Overrides:
        isLogPanic in class org.refcodes.logger.RuntimeLoggerImpl