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.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
Modifier and TypeFieldDescriptionstatic String
The default Spring bean name for a refcodesRuntimeLogger
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
ModifierConstructorDescriptionprotected
SpringRuntimeLoggerSingleton
(org.refcodes.logger.Logger<Object> aLogger, org.refcodes.logger.LogPriority aPriority) Instantiates a new spring runtime logger singleton. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
void
void
void
void
void
void
void
void
void
void
static org.refcodes.logger.RuntimeLogger
Returns the singleton's instance as fabricated by thisSpringRuntimeLoggerSingleton
.static org.refcodes.logger.RuntimeLogger
getInstance
(String aLoggerBeanId) Returns the singleton's instance as fabricated by thisSpringRuntimeLoggerSingleton
.org.refcodes.logger.LogPriority
getName()
void
void
boolean
isLog
(org.refcodes.logger.LogPriority aPriority) boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
void
void
void
log
(org.refcodes.logger.LogPriority aPriority, String aMessage, Throwable aThrowable, Object... aArguments) void
void
void
void
void
void
void
void
void
void
void
void
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
The default Spring bean name for a refcodesRuntimeLogger
bean. -
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 loggeraPriority
- the priority
-
-
Method Details
-
getInstance
public static org.refcodes.logger.RuntimeLogger getInstance() throws org.refcodes.logger.LoggerInstantiationRuntimeExceptionReturns 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(String aLoggerBeanId) throws org.refcodes.logger.LoggerInstantiationRuntimeException Returns the singleton's instance as fabricated by thisSpringRuntimeLoggerSingleton
.- Parameters:
aLoggerBeanId
- The logger's bean TID 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
- 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
- Specified by:
log
in interfaceorg.refcodes.logger.MessageLogger<org.refcodes.logger.LogPriority>
- Overrides:
log
in classorg.refcodes.logger.RuntimeLoggerImpl
-
log
- Specified by:
log
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
log
in classorg.refcodes.logger.RuntimeLoggerImpl
-
log
- 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, String aMessage, Throwable aThrowable, 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
- Specified by:
trace
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
trace
in classorg.refcodes.logger.RuntimeLoggerImpl
-
trace
- 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
- Specified by:
debug
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
debug
in classorg.refcodes.logger.RuntimeLoggerImpl
-
debug
- 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
- Specified by:
info
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
info
in classorg.refcodes.logger.RuntimeLoggerImpl
-
info
- 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
- Specified by:
notice
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
notice
in classorg.refcodes.logger.RuntimeLoggerImpl
-
notice
- 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
- Specified by:
warn
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
warn
in classorg.refcodes.logger.RuntimeLoggerImpl
-
warn
- Specified by:
warn
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
warn
in classorg.refcodes.logger.RuntimeLoggerImpl
-
warn
- Specified by:
warn
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
warn
in classorg.refcodes.logger.RuntimeLoggerImpl
-
warn
- 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
- Specified by:
error
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
error
in classorg.refcodes.logger.RuntimeLoggerImpl
-
error
- Specified by:
error
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
error
in classorg.refcodes.logger.RuntimeLoggerImpl
-
error
- Specified by:
error
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
error
in classorg.refcodes.logger.RuntimeLoggerImpl
-
error
- 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
- Specified by:
critical
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
critical
in classorg.refcodes.logger.RuntimeLoggerImpl
-
critical
- Specified by:
critical
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
critical
in classorg.refcodes.logger.RuntimeLoggerImpl
-
critical
- Specified by:
critical
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
critical
in classorg.refcodes.logger.RuntimeLoggerImpl
-
critical
- 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
- Specified by:
alert
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
alert
in classorg.refcodes.logger.RuntimeLoggerImpl
-
alert
- Specified by:
alert
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
alert
in classorg.refcodes.logger.RuntimeLoggerImpl
-
alert
- Specified by:
alert
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
alert
in classorg.refcodes.logger.RuntimeLoggerImpl
-
alert
- 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
- Specified by:
panic
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
panic
in classorg.refcodes.logger.RuntimeLoggerImpl
-
panic
- Specified by:
panic
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
panic
in classorg.refcodes.logger.RuntimeLoggerImpl
-
panic
- Specified by:
panic
in interfaceorg.refcodes.logger.RuntimeLogger
- Overrides:
panic
in classorg.refcodes.logger.RuntimeLoggerImpl
-
panic
- 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
-