java.lang.Object
org.refcodes.logger.alt.slf4j.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.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.logger.LogPriorityAccessor
org.refcodes.logger.LogPriorityAccessor.LogPriorityMutator, org.refcodes.logger.LogPriorityAccessor.LogPriorityPropertyNested 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 inherited from interface org.refcodes.logger.RuntimeLogger
ROOT_LOGGER_ELEMENT_PATH, RUNTIME_LOGGER_CONFIG -
Constructor Summary
ConstructorsConstructorDescriptionIn case theSlf4jRuntimeLogger(as created by theSlf4jRuntimeLoggerFactorySingleton) detects that SLF4J has bound a SLF4JRuntimeLoggerAdapterImpl(seerefcodes-logger-ext-slf4j, the REFCODES.ORG SLF4J binding) (i.e. the REFCODES.ORG SLF4J binding), it directly delegates its method calls to the wrappedRuntimeLoggerinstead of marshaling a log request through the SLF4JRuntimeLoggerAdapterImpl; as marshaling would mean consolidating of various detailedLogPrioritylevels to a single SLF4J log level.Slf4jRuntimeLogger(Logger aLogger) In case theSlf4jRuntimeLogger(as created by theSlf4jRuntimeLoggerFactorySingleton) detects that SLF4J has bound a SLF4JRuntimeLoggerAdapterImpl(seerefcodes-logger-ext-slf4j, the REFCODES.ORG SLF4J binding), it directly delegates its method calls to the wrappedRuntimeLoggerinstead of marshaling a log request through the SLF4JRuntimeLoggerAdapterImplas marshaling would mean consolidating of various detailedLogPrioritylevels to a single SLF4J log level. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidorg.refcodes.logger.LogPrioritygetName()voidvoidbooleanisLog(org.refcodes.logger.LogPriority aPriority) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidvoidvoidvoidlog(org.refcodes.logger.LogPriority aPriority, String aMessage, Throwable aThrowable, Object... aArguments) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.refcodes.logger.LogDecorator
printHead, printSeparator, printTailMethods inherited from interface org.refcodes.mixin.NameAccessor.NameProperty
letNameMethods inherited from interface org.refcodes.logger.RuntimeLogger
log
-
Constructor Details
-
Slf4jRuntimeLogger
public Slf4jRuntimeLogger()In case theSlf4jRuntimeLogger(as created by theSlf4jRuntimeLoggerFactorySingleton) detects that SLF4J has bound a SLF4JRuntimeLoggerAdapterImpl(seerefcodes-logger-ext-slf4j, the REFCODES.ORG SLF4J binding) (i.e. the REFCODES.ORG SLF4J binding), it directly delegates its method calls to the wrappedRuntimeLoggerinstead of marshaling a log request through the SLF4JRuntimeLoggerAdapterImpl; as marshaling would mean consolidating of various detailedLogPrioritylevels to a single SLF4J log level. -
Slf4jRuntimeLogger
In case theSlf4jRuntimeLogger(as created by theSlf4jRuntimeLoggerFactorySingleton) detects that SLF4J has bound a SLF4JRuntimeLoggerAdapterImpl(seerefcodes-logger-ext-slf4j, the REFCODES.ORG SLF4J binding), it directly delegates its method calls to the wrappedRuntimeLoggerinstead of marshaling a log request through the SLF4JRuntimeLoggerAdapterImplas marshaling would mean consolidating of various detailedLogPrioritylevels to a single SLF4J log level.- Parameters:
aLogger- the logger to use SLF4J for logging.
-
-
Method Details
-
log
- Specified by:
login interfaceorg.refcodes.logger.MessageLogger<org.refcodes.logger.LogPriority>
-
log
- Specified by:
login interfaceorg.refcodes.logger.MessageLogger<org.refcodes.logger.LogPriority>
-
getName
- Specified by:
getNamein interfaceorg.refcodes.mixin.NameAccessor
-
setName
- Specified by:
setNamein interfaceorg.refcodes.mixin.NameAccessor.NameMutator
-
getLogPriority
public org.refcodes.logger.LogPriority getLogPriority()- Specified by:
getLogPriorityin interfaceorg.refcodes.logger.LogPriorityAccessor
-
log
- Specified by:
login interfaceorg.refcodes.logger.RuntimeLogger
-
log
public void log(org.refcodes.logger.LogPriority aPriority, String aMessage, Throwable aThrowable, Object... aArguments) - Specified by:
login interfaceorg.refcodes.logger.RuntimeLogger
-
isLog
public boolean isLog(org.refcodes.logger.LogPriority aPriority) - Specified by:
isLogin interfaceorg.refcodes.logger.RuntimeLogger
-
trace
- Specified by:
tracein interfaceorg.refcodes.logger.RuntimeLogger
-
trace
- Specified by:
tracein interfaceorg.refcodes.logger.RuntimeLogger
-
isLogTrace
public boolean isLogTrace()- Specified by:
isLogTracein interfaceorg.refcodes.logger.RuntimeLogger
-
debug
- Specified by:
debugin interfaceorg.refcodes.logger.RuntimeLogger
-
debug
- Specified by:
debugin interfaceorg.refcodes.logger.RuntimeLogger
-
isLogDebug
public boolean isLogDebug()- Specified by:
isLogDebugin interfaceorg.refcodes.logger.RuntimeLogger
-
info
- Specified by:
infoin interfaceorg.refcodes.logger.RuntimeLogger
-
info
- Specified by:
infoin interfaceorg.refcodes.logger.RuntimeLogger
-
isLogInfo
public boolean isLogInfo()- Specified by:
isLogInfoin interfaceorg.refcodes.logger.RuntimeLogger
-
notice
- Specified by:
noticein interfaceorg.refcodes.logger.RuntimeLogger
-
notice
- Specified by:
noticein interfaceorg.refcodes.logger.RuntimeLogger
-
isLogNotice
public boolean isLogNotice()- Specified by:
isLogNoticein interfaceorg.refcodes.logger.RuntimeLogger
-
warn
- Specified by:
warnin interfaceorg.refcodes.logger.RuntimeLogger
-
warn
- Specified by:
warnin interfaceorg.refcodes.logger.RuntimeLogger
-
warn
- Specified by:
warnin interfaceorg.refcodes.logger.RuntimeLogger
-
warn
- Specified by:
warnin interfaceorg.refcodes.logger.RuntimeLogger
-
isLogWarn
public boolean isLogWarn()- Specified by:
isLogWarnin interfaceorg.refcodes.logger.RuntimeLogger
-
error
- Specified by:
errorin interfaceorg.refcodes.logger.RuntimeLogger
-
error
- Specified by:
errorin interfaceorg.refcodes.logger.RuntimeLogger
-
error
- Specified by:
errorin interfaceorg.refcodes.logger.RuntimeLogger
-
error
- Specified by:
errorin interfaceorg.refcodes.logger.RuntimeLogger
-
isLogError
public boolean isLogError()- Specified by:
isLogErrorin interfaceorg.refcodes.logger.RuntimeLogger
-
critical
- Specified by:
criticalin interfaceorg.refcodes.logger.RuntimeLogger
-
critical
- Specified by:
criticalin interfaceorg.refcodes.logger.RuntimeLogger
-
critical
- Specified by:
criticalin interfaceorg.refcodes.logger.RuntimeLogger
-
critical
- Specified by:
criticalin interfaceorg.refcodes.logger.RuntimeLogger
-
isLogCritical
public boolean isLogCritical()- Specified by:
isLogCriticalin interfaceorg.refcodes.logger.RuntimeLogger
-
alert
- Specified by:
alertin interfaceorg.refcodes.logger.RuntimeLogger
-
alert
- Specified by:
alertin interfaceorg.refcodes.logger.RuntimeLogger
-
alert
- Specified by:
alertin interfaceorg.refcodes.logger.RuntimeLogger
-
alert
- Specified by:
alertin interfaceorg.refcodes.logger.RuntimeLogger
-
isLogAlert
public boolean isLogAlert()- Specified by:
isLogAlertin interfaceorg.refcodes.logger.RuntimeLogger
-
panic
- Specified by:
panicin interfaceorg.refcodes.logger.RuntimeLogger
-
panic
- Specified by:
panicin interfaceorg.refcodes.logger.RuntimeLogger
-
panic
- Specified by:
panicin interfaceorg.refcodes.logger.RuntimeLogger
-
panic
- Specified by:
panicin interfaceorg.refcodes.logger.RuntimeLogger
-
isLogPanic
public boolean isLogPanic()- Specified by:
isLogPanicin interfaceorg.refcodes.logger.RuntimeLogger
-