Package org.refcodes.logger.alt.slf4j
Class Slf4jLogger
- java.lang.Object
-
- org.refcodes.logger.alt.slf4j.Slf4jLogger
-
- All Implemented Interfaces:
org.refcodes.logger.Logger<java.lang.Object>
,org.refcodes.mixin.NameAccessor.NameMutator
public class Slf4jLogger extends java.lang.Object implements org.refcodes.logger.Logger<java.lang.Object>, org.refcodes.mixin.NameAccessor.NameMutator
TheSlf4jLogger
delegagres all logs to an accordingLogger
instance. This logger may be used as underlyingLogger
for theRuntimeLogger
(RuntimeLoggerImpl
).- Author:
- steiner
-
-
Constructor Summary
Constructors Constructor Description Slf4jLogger()
Instantiates a newSlf4jLogger
by determining the underlyingLogger
's name from the caller's stack trace.Slf4jLogger(java.lang.String aName)
Instantiates a newSlf4jLogger
by setting the underlyingLogger
's name with the provided name.See alsosetName(String)
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
log(org.refcodes.tabular.Record<? extends java.lang.Object> aRecord)
void
setName(java.lang.String aName)
-
-
-
Constructor Detail
-
Slf4jLogger
public Slf4jLogger()
Instantiates a newSlf4jLogger
by determining the underlyingLogger
's name from the caller's stack trace. See alsosetName(String)
.
-
Slf4jLogger
public Slf4jLogger(java.lang.String aName)
Instantiates a newSlf4jLogger
by setting the underlyingLogger
's name with the provided name.See alsosetName(String)
.- Parameters:
aName
- The name to be used for the logger.
-
-
Method Detail
-
log
public void log(org.refcodes.tabular.Record<? extends java.lang.Object> aRecord) throws org.refcodes.logger.IllegalRecordRuntimeException, org.refcodes.logger.UnexpectedLogRuntimeException
- Specified by:
log
in interfaceorg.refcodes.logger.Logger<java.lang.Object>
- Throws:
org.refcodes.logger.IllegalRecordRuntimeException
org.refcodes.logger.UnexpectedLogRuntimeException
-
setName
public void setName(java.lang.String aName)
- Specified by:
setName
in interfaceorg.refcodes.mixin.NameAccessor.NameMutator
-
-