Package org.refcodes.logger.alt.spring
Class SpringRuntimeLoggerSingleton
- java.lang.Object
-
- org.refcodes.logger.RuntimeLoggerImpl
-
- org.refcodes.logger.alt.spring.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 classRuntimeLoggerSingleton
. TheSpringRuntimeLoggerSingleton
provides aRuntimeLogger
singleton from the class specified in the beanRUNTIME_LOGGER_BEAN
declared by the context fileRUNTIME_LOGGER_CONTEXT
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
RUNTIME_LOGGER_BEAN
The default Spring bean name for a refcodesRuntimeLogger
bean.static java.lang.String
RUNTIME_LOGGER_CONTEXT
The filename of the file on the classpath containing the spring context for the runtime logger.
-
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 thisSpringRuntimeLoggerSingleton
.static org.refcodes.logger.RuntimeLogger
getInstance(java.lang.String aLoggerBeanId)
Returns the singleton's instance as fabricated by thisSpringRuntimeLoggerSingleton
.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)
-
-
-
Field Detail
-
RUNTIME_LOGGER_BEAN
public static java.lang.String RUNTIME_LOGGER_BEAN
The default Spring bean name for a refcodesRuntimeLogger
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
-
-
Method Detail
-
getInstance
public static org.refcodes.logger.RuntimeLogger getInstance() throws org.refcodes.logger.LoggerInstantiationRuntimeException
Returns the singleton's instance as fabricated by thisSpringRuntimeLoggerSingleton
.- Returns:
- The
RuntimeLogger
singleton's instance. - Throws:
org.refcodes.logger.LoggerInstantiationRuntimeException
- Thrown in case instantiating aLogger
(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 thisSpringRuntimeLoggerSingleton
.- Parameters:
aLoggerBeanId
- The logger's bean ID as defined in the accordingRUNTIME_LOGGER_CONTEXT
Spring context file.- Returns:
- The
RuntimeLogger
singleton's instance. - Throws:
org.refcodes.logger.LoggerInstantiationRuntimeException
- Thrown in case instantiating aLogger
(RuntimeLogger
) failed
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceorg.refcodes.mixin.NameAccessor
- Overrides:
getName
in classorg.refcodes.logger.RuntimeLoggerImpl
-
getLogPriority
public org.refcodes.logger.LogPriority getLogPriority()
- Specified by:
getLogPriority
in interfaceorg.refcodes.logger.LogPriorityAccessor
- Overrides:
getLogPriority
in classorg.refcodes.logger.RuntimeLoggerImpl
-
log
public void log(org.refcodes.logger.LogPriority aMarker, java.lang.String aMessage)
- Specified by:
log
in interfaceorg.refcodes.logger.MessageLogger<org.refcodes.logger.LogPriority>
- Overrides:
log
in classorg.refcodes.logger.RuntimeLoggerImpl
-
log
public void log(org.refcodes.logger.LogPriority aPriority, java.lang.String aMessage, java.lang.Throwable aThrowable)
- Specified by:
log
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
log
in classorg.refcodes.logger.RuntimeLoggerImpl
-
log
public void log(org.refcodes.logger.LogPriority aMarker, java.lang.String aMessage, java.lang.Object... aArguments)
- Specified by:
log
in interfaceorg.refcodes.logger.MessageLogger<org.refcodes.logger.LogPriority>
- Overrides:
log
in classorg.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 interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
log
in classorg.refcodes.logger.RuntimeLoggerImpl
-
isLog
public boolean isLog(org.refcodes.logger.LogPriority aPriority)
- Specified by:
isLog
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
isLog
in classorg.refcodes.logger.RuntimeLoggerImpl
-
trace
public void trace(java.lang.String aMessage)
- Specified by:
trace
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
trace
in classorg.refcodes.logger.RuntimeLoggerImpl
-
trace
public void trace(java.lang.String aMessage, java.lang.Object... aArguments)
- Specified by:
trace
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
trace
in classorg.refcodes.logger.RuntimeLoggerImpl
-
isLogTrace
public boolean isLogTrace()
- Specified by:
isLogTrace
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
isLogTrace
in classorg.refcodes.logger.RuntimeLoggerImpl
-
debug
public void debug(java.lang.String aMessage)
- Specified by:
debug
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
debug
in classorg.refcodes.logger.RuntimeLoggerImpl
-
debug
public void debug(java.lang.String aMessage, java.lang.Object... aArguments)
- Specified by:
debug
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
debug
in classorg.refcodes.logger.RuntimeLoggerImpl
-
isLogDebug
public boolean isLogDebug()
- Specified by:
isLogDebug
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
isLogDebug
in classorg.refcodes.logger.RuntimeLoggerImpl
-
info
public void info(java.lang.String aMessage)
- Specified by:
info
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
info
in classorg.refcodes.logger.RuntimeLoggerImpl
-
info
public void info(java.lang.String aMessage, java.lang.Object... aArguments)
- Specified by:
info
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
info
in classorg.refcodes.logger.RuntimeLoggerImpl
-
isLogInfo
public boolean isLogInfo()
- Specified by:
isLogInfo
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
isLogInfo
in classorg.refcodes.logger.RuntimeLoggerImpl
-
notice
public void notice(java.lang.String aMessage)
- Specified by:
notice
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
notice
in classorg.refcodes.logger.RuntimeLoggerImpl
-
notice
public void notice(java.lang.String aMessage, java.lang.Object... aArguments)
- Specified by:
notice
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
notice
in classorg.refcodes.logger.RuntimeLoggerImpl
-
isLogNotice
public boolean isLogNotice()
- Specified by:
isLogNotice
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
isLogNotice
in classorg.refcodes.logger.RuntimeLoggerImpl
-
warn
public void warn(java.lang.String aMessage)
- Specified by:
warn
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
warn
in classorg.refcodes.logger.RuntimeLoggerImpl
-
warn
public void warn(java.lang.String aMessage, java.lang.Object... aArguments)
- Specified by:
warn
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
warn
in classorg.refcodes.logger.RuntimeLoggerImpl
-
warn
public void warn(java.lang.String aMessage, java.lang.Throwable aThrowable)
- Specified by:
warn
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
warn
in classorg.refcodes.logger.RuntimeLoggerImpl
-
warn
public void warn(java.lang.String aMessage, java.lang.Throwable aThrowable, java.lang.Object... aArguments)
- Specified by:
warn
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
warn
in classorg.refcodes.logger.RuntimeLoggerImpl
-
isLogWarn
public boolean isLogWarn()
- Specified by:
isLogWarn
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
isLogWarn
in classorg.refcodes.logger.RuntimeLoggerImpl
-
error
public void error(java.lang.String aMessage)
- Specified by:
error
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
error
in classorg.refcodes.logger.RuntimeLoggerImpl
-
error
public void error(java.lang.String aMessage, java.lang.Object... aArguments)
- Specified by:
error
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
error
in classorg.refcodes.logger.RuntimeLoggerImpl
-
error
public void error(java.lang.String aMessage, java.lang.Throwable aThrowable)
- Specified by:
error
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
error
in classorg.refcodes.logger.RuntimeLoggerImpl
-
error
public void error(java.lang.String aMessage, java.lang.Throwable aThrowable, java.lang.Object... aArguments)
- Specified by:
error
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
error
in classorg.refcodes.logger.RuntimeLoggerImpl
-
isLogError
public boolean isLogError()
- Specified by:
isLogError
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
isLogError
in classorg.refcodes.logger.RuntimeLoggerImpl
-
critical
public void critical(java.lang.String aMessage)
- Specified by:
critical
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
critical
in classorg.refcodes.logger.RuntimeLoggerImpl
-
critical
public void critical(java.lang.String aMessage, java.lang.Object... aArguments)
- Specified by:
critical
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
critical
in classorg.refcodes.logger.RuntimeLoggerImpl
-
critical
public void critical(java.lang.String aMessage, java.lang.Throwable aThrowable)
- Specified by:
critical
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
critical
in classorg.refcodes.logger.RuntimeLoggerImpl
-
critical
public void critical(java.lang.String aMessage, java.lang.Throwable aThrowable, java.lang.Object... aArguments)
- Specified by:
critical
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
critical
in classorg.refcodes.logger.RuntimeLoggerImpl
-
isLogCritical
public boolean isLogCritical()
- Specified by:
isLogCritical
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
isLogCritical
in classorg.refcodes.logger.RuntimeLoggerImpl
-
alert
public void alert(java.lang.String aMessage)
- Specified by:
alert
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
alert
in classorg.refcodes.logger.RuntimeLoggerImpl
-
alert
public void alert(java.lang.String aMessage, java.lang.Object... aArguments)
- Specified by:
alert
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
alert
in classorg.refcodes.logger.RuntimeLoggerImpl
-
alert
public void alert(java.lang.String aMessage, java.lang.Throwable aThrowable)
- Specified by:
alert
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
alert
in classorg.refcodes.logger.RuntimeLoggerImpl
-
alert
public void alert(java.lang.String aMessage, java.lang.Throwable aThrowable, java.lang.Object... aArguments)
- Specified by:
alert
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
alert
in classorg.refcodes.logger.RuntimeLoggerImpl
-
isLogAlert
public boolean isLogAlert()
- Specified by:
isLogAlert
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
isLogAlert
in classorg.refcodes.logger.RuntimeLoggerImpl
-
panic
public void panic(java.lang.String aMessage)
- Specified by:
panic
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
panic
in classorg.refcodes.logger.RuntimeLoggerImpl
-
panic
public void panic(java.lang.String aMessage, java.lang.Object... aArguments)
- Specified by:
panic
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
panic
in classorg.refcodes.logger.RuntimeLoggerImpl
-
panic
public void panic(java.lang.String aMessage, java.lang.Throwable aThrowable)
- Specified by:
panic
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
panic
in classorg.refcodes.logger.RuntimeLoggerImpl
-
panic
public void panic(java.lang.String aMessage, java.lang.Throwable aThrowable, java.lang.Object... aArguments)
- Specified by:
panic
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
panic
in classorg.refcodes.logger.RuntimeLoggerImpl
-
isLogPanic
public boolean isLogPanic()
- Specified by:
isLogPanic
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
isLogPanic
in classorg.refcodes.logger.RuntimeLoggerImpl
-
-