java.lang.Object
org.refcodes.logger.alt.slf4j.Slf4jLogger
- All Implemented Interfaces:
org.refcodes.logger.LogDecorator,org.refcodes.logger.Logger<Object>,org.refcodes.mixin.NameAccessor.NameMutator
public class Slf4jLogger
extends Object
implements org.refcodes.logger.Logger<Object>, org.refcodes.mixin.NameAccessor.NameMutator
The
Slf4jLogger delegates all logs to an according
Logger instance. This logger may be used as underlying
Logger for the RuntimeLogger (RuntimeLoggerImpl).- Author:
- steiner
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a newSlf4jLoggerby determining the underlyingLogger's name from the caller's stack trace.Slf4jLogger(String aName) Instantiates a newSlf4jLoggerby setting the underlyingLogger's name with the provided name.See alsosetName(String). -
Method Summary
Methods 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, printTail
-
Constructor Details
-
Slf4jLogger
public Slf4jLogger()Instantiates a newSlf4jLoggerby determining the underlyingLogger's name from the caller's stack trace. See alsosetName(String). -
Slf4jLogger
Instantiates a newSlf4jLoggerby setting the underlyingLogger's name with the provided name.See alsosetName(String).- Parameters:
aName- The name to be used for the logger.
-
-
Method Details
-
log
public void log(org.refcodes.tabular.Record<? extends Object> aRecord) throws org.refcodes.logger.IllegalRecordRuntimeException, org.refcodes.logger.UnexpectedLogRuntimeException - Specified by:
login interfaceorg.refcodes.logger.Logger<Object>- Throws:
org.refcodes.logger.IllegalRecordRuntimeExceptionorg.refcodes.logger.UnexpectedLogRuntimeException
-
setName
- Specified by:
setNamein interfaceorg.refcodes.mixin.NameAccessor.NameMutator
-