Class 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
    The Slf4jLogger delegagres all logs to an according Logger instance. This logger may be used as underlying Logger for the RuntimeLogger (RuntimeLoggerImpl).
    Author:
    steiner
    • Constructor Summary

      Constructors 
      Constructor Description
      Slf4jLogger​()
      Instantiates a new Slf4jLogger by determining the underlying Logger's name from the caller's stack trace.
      Slf4jLogger​(java.lang.String aName)
      Instantiates a new Slf4jLogger by setting the underlying Logger's name with the provided name.See also setName(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)
      • Methods inherited from interface org.refcodes.logger.Logger

        printSeparator
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Slf4jLogger

        public Slf4jLogger​()
        Instantiates a new Slf4jLogger by determining the underlying Logger's name from the caller's stack trace. See also setName(String).
      • Slf4jLogger

        public Slf4jLogger​(java.lang.String aName)
        Instantiates a new Slf4jLogger by setting the underlying Logger's name with the provided name.See also setName(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 interface org.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 interface org.refcodes.mixin.NameAccessor.NameMutator