Class Slf4jRuntimeLogger
java.lang.Object
org.refcodes.logger.alt.slf4j.legacy.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.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 inherited from interface org.refcodes.logger.RuntimeLogger
ROOT_LOGGER_ELEMENT_PATH, RUNTIME_LOGGER_CONFIG
-
Constructor Summary
ConstructorDescriptionIn 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 wrappedRuntimeLogger
instead of marshaling a log request through the SLF4JRuntimeLoggerAdapterImpl
; as marshaling would mean consolidating of various detailedLogPriority
levels 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 wrappedRuntimeLogger
instead of marshaling a log request through the SLF4JRuntimeLoggerAdapterImpl
as marshaling would mean consolidating of various detailedLogPriority
levels to a single SLF4J log level. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
void
void
void
void
void
void
void
void
void
void
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
void
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.LogDecorator
printHead, printSeparator, printTail
Methods inherited from interface org.refcodes.mixin.NameAccessor.NameProperty
letName
Methods 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 wrappedRuntimeLogger
instead of marshaling a log request through the SLF4JRuntimeLoggerAdapterImpl
; as marshaling would mean consolidating of various detailedLogPriority
levels 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 wrappedRuntimeLogger
instead of marshaling a log request through the SLF4JRuntimeLoggerAdapterImpl
as marshaling would mean consolidating of various detailedLogPriority
levels to a single SLF4J log level.- Parameters:
aLogger
- the logger to use SLF4J for logging.
-
-
Method Details
-
log
- Specified by:
log
in interfaceorg.refcodes.logger.MessageLogger<org.refcodes.logger.LogPriority>
-
log
- Specified by:
log
in interfaceorg.refcodes.logger.MessageLogger<org.refcodes.logger.LogPriority>
-
getName
- Specified by:
getName
in interfaceorg.refcodes.mixin.NameAccessor
-
setName
- Specified by:
setName
in interfaceorg.refcodes.mixin.NameAccessor.NameMutator
-
getLogPriority
public org.refcodes.logger.LogPriority getLogPriority()- Specified by:
getLogPriority
in interfaceorg.refcodes.logger.LogPriorityAccessor
-
log
- Specified by:
log
in interfaceorg.refcodes.logger.RuntimeLogger
-
log
public void log(org.refcodes.logger.LogPriority aPriority, String aMessage, Throwable aThrowable, Object... aArguments) - Specified by:
log
in interfaceorg.refcodes.logger.RuntimeLogger
-
isLog
public boolean isLog(org.refcodes.logger.LogPriority aPriority) - Specified by:
isLog
in interfaceorg.refcodes.logger.RuntimeLogger
-
trace
- Specified by:
trace
in interfaceorg.refcodes.logger.RuntimeLogger
-
trace
- Specified by:
trace
in interfaceorg.refcodes.logger.RuntimeLogger
-
isLogTrace
public boolean isLogTrace()- Specified by:
isLogTrace
in interfaceorg.refcodes.logger.RuntimeLogger
-
debug
- Specified by:
debug
in interfaceorg.refcodes.logger.RuntimeLogger
-
debug
- Specified by:
debug
in interfaceorg.refcodes.logger.RuntimeLogger
-
isLogDebug
public boolean isLogDebug()- Specified by:
isLogDebug
in interfaceorg.refcodes.logger.RuntimeLogger
-
info
- Specified by:
info
in interfaceorg.refcodes.logger.RuntimeLogger
-
info
- Specified by:
info
in interfaceorg.refcodes.logger.RuntimeLogger
-
isLogInfo
public boolean isLogInfo()- Specified by:
isLogInfo
in interfaceorg.refcodes.logger.RuntimeLogger
-
notice
- Specified by:
notice
in interfaceorg.refcodes.logger.RuntimeLogger
-
notice
- Specified by:
notice
in interfaceorg.refcodes.logger.RuntimeLogger
-
isLogNotice
public boolean isLogNotice()- Specified by:
isLogNotice
in interfaceorg.refcodes.logger.RuntimeLogger
-
warn
- Specified by:
warn
in interfaceorg.refcodes.logger.RuntimeLogger
-
warn
- Specified by:
warn
in interfaceorg.refcodes.logger.RuntimeLogger
-
warn
- Specified by:
warn
in interfaceorg.refcodes.logger.RuntimeLogger
-
warn
- Specified by:
warn
in interfaceorg.refcodes.logger.RuntimeLogger
-
isLogWarn
public boolean isLogWarn()- Specified by:
isLogWarn
in interfaceorg.refcodes.logger.RuntimeLogger
-
error
- Specified by:
error
in interfaceorg.refcodes.logger.RuntimeLogger
-
error
- Specified by:
error
in interfaceorg.refcodes.logger.RuntimeLogger
-
error
- Specified by:
error
in interfaceorg.refcodes.logger.RuntimeLogger
-
error
- Specified by:
error
in interfaceorg.refcodes.logger.RuntimeLogger
-
isLogError
public boolean isLogError()- Specified by:
isLogError
in interfaceorg.refcodes.logger.RuntimeLogger
-
critical
- Specified by:
critical
in interfaceorg.refcodes.logger.RuntimeLogger
-
critical
- Specified by:
critical
in interfaceorg.refcodes.logger.RuntimeLogger
-
critical
- Specified by:
critical
in interfaceorg.refcodes.logger.RuntimeLogger
-
critical
- Specified by:
critical
in interfaceorg.refcodes.logger.RuntimeLogger
-
isLogCritical
public boolean isLogCritical()- Specified by:
isLogCritical
in interfaceorg.refcodes.logger.RuntimeLogger
-
alert
- Specified by:
alert
in interfaceorg.refcodes.logger.RuntimeLogger
-
alert
- Specified by:
alert
in interfaceorg.refcodes.logger.RuntimeLogger
-
alert
- Specified by:
alert
in interfaceorg.refcodes.logger.RuntimeLogger
-
alert
- Specified by:
alert
in interfaceorg.refcodes.logger.RuntimeLogger
-
isLogAlert
public boolean isLogAlert()- Specified by:
isLogAlert
in interfaceorg.refcodes.logger.RuntimeLogger
-
panic
- Specified by:
panic
in interfaceorg.refcodes.logger.RuntimeLogger
-
panic
- Specified by:
panic
in interfaceorg.refcodes.logger.RuntimeLogger
-
panic
- Specified by:
panic
in interfaceorg.refcodes.logger.RuntimeLogger
-
panic
- Specified by:
panic
in interfaceorg.refcodes.logger.RuntimeLogger
-
isLogPanic
public boolean isLogPanic()- Specified by:
isLogPanic
in interfaceorg.refcodes.logger.RuntimeLogger
-