Class SpringRuntimeLoggerSingleton

java.lang.Object
org.refcodes.logger.RuntimeLoggerImpl
org.refcodes.logger.alt.spring.SpringRuntimeLoggerSingleton
All Implemented Interfaces:
org.refcodes.logger.LogDecorator, org.refcodes.logger.LoggerAccessor<org.refcodes.logger.Logger<Object>>, org.refcodes.logger.LoggerAccessor.LoggerMutator<org.refcodes.logger.Logger<Object>>, org.refcodes.logger.LoggerAccessor.LoggerProperty<org.refcodes.logger.Logger<Object>>, org.refcodes.logger.LogPriorityAccessor, org.refcodes.logger.LogPriorityAccessor.LogPriorityMutator, org.refcodes.logger.LogPriorityAccessor.LogPriorityProperty, 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 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.LoggerAccessor

    org.refcodes.logger.LoggerAccessor.LoggerMutator<L extends org.refcodes.logger.Logger<?>>, org.refcodes.logger.LoggerAccessor.LoggerProperty<L extends org.refcodes.logger.Logger<?>>

    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 String
    The default Spring bean name for a refcodes RuntimeLogger bean.
    static final String
    The filename of the file on the classpath containing the spring context for the runtime logger.

    Fields inherited from class org.refcodes.logger.RuntimeLoggerImpl

    DEFAULT_LOG_PRIORITY, ROOT_LOGGER_NAME

    Fields inherited from interface org.refcodes.logger.RuntimeLogger

    ROOT_LOGGER_ELEMENT_PATH, RUNTIME_LOGGER_CONFIG
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    void
    alert(String aMessage)
    void
    alert(String aMessage, Object... aArguments)
    void
    alert(String aMessage, Throwable aThrowable)
    void
    alert(String aMessage, Throwable aThrowable, Object... aArguments)
    void
    critical(String aMessage)
    void
    critical(String aMessage, Object... aArguments)
    void
    critical(String aMessage, Throwable aThrowable)
    void
    critical(String aMessage, Throwable aThrowable, Object... aArguments)
    void
    debug(String aMessage)
    void
    debug(String aMessage, Object... aArguments)
    void
    error(String aMessage)
    void
    error(String aMessage, Object... aArguments)
    void
    error(String aMessage, Throwable aThrowable)
    void
    error(String aMessage, Throwable aThrowable, Object... aArguments)
    static org.refcodes.logger.RuntimeLogger
    Returns the singleton's instance as fabricated by this SpringRuntimeLoggerSingleton.
    static org.refcodes.logger.RuntimeLogger
    getInstance(String aLoggerBeanId)
    Returns the singleton's instance as fabricated by this SpringRuntimeLoggerSingleton.
    org.refcodes.logger.LogPriority
    void
    info(String aMessage)
    void
    info(String aMessage, Object... aArguments)
    boolean
    isLog(org.refcodes.logger.LogPriority aPriority)
    boolean
    boolean
    boolean
    boolean
    boolean
    boolean
    boolean
    boolean
     
    boolean
    void
    log(org.refcodes.logger.LogPriority aMarker, String aMessage)
    void
    log(org.refcodes.logger.LogPriority aMarker, String aMessage, Object... aArguments)
    void
    log(org.refcodes.logger.LogPriority aPriority, String aMessage, Throwable aThrowable)
    void
    log(org.refcodes.logger.LogPriority aPriority, String aMessage, Throwable aThrowable, Object... aArguments)
    void
    notice(String aMessage)
    void
    notice(String aMessage, Object... aArguments)
    void
    panic(String aMessage)
    void
    panic(String aMessage, Object... aArguments)
    void
    panic(String aMessage, Throwable aThrowable)
    void
    panic(String aMessage, Throwable aThrowable, Object... aArguments)
    void
    trace(String aMessage)
    void
    trace(String aMessage, Object... aArguments)
    void
    warn(String aMessage)
    void
    warn(String aMessage, Object... aArguments)
    void
    warn(String aMessage, Throwable aThrowable)
    void
    warn(String aMessage, Throwable aThrowable, Object... aArguments)

    Methods inherited from class org.refcodes.logger.RuntimeLoggerImpl

    doLog, getCallerStackTraceElement, getLogger, printHead, printSeparator, printTail, setLogger, setLogLevel, setLogPriority, setName

    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.LoggerAccessor.LoggerProperty

    letLogger

    Methods inherited from interface org.refcodes.logger.LogPriorityAccessor.LogPriorityProperty

    letLogPriority

    Methods inherited from interface org.refcodes.mixin.NameAccessor.NameProperty

    letName

    Methods inherited from interface org.refcodes.logger.RuntimeLogger

    log
  • Field Details

    • RUNTIME_LOGGER_BEAN

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

      public static final String RUNTIME_LOGGER_CONTEXT
      The filename of the file on the classpath containing the spring context for the runtime logger.
      See Also:
  • Constructor Details

    • SpringRuntimeLoggerSingleton

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

    • 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(String aLoggerBeanId) throws org.refcodes.logger.LoggerInstantiationRuntimeException
      Returns the singleton's instance as fabricated by this SpringRuntimeLoggerSingleton.
      Parameters:
      aLoggerBeanId - The logger's bean TID 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 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, 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, String aMessage, 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, String aMessage, 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, String aMessage, Throwable aThrowable, 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(String aMessage)
      Specified by:
      trace in interface org.refcodes.logger.RuntimeLogger
      Overrides:
      trace in class org.refcodes.logger.RuntimeLoggerImpl
    • trace

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public void panic(String aMessage, Throwable aThrowable, 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