Class Log4J2Logger


  • public class Log4J2Logger
    extends NucleusLogger
    Log4J v2 implementation of a NucleusLogger. See http://logging.apache.org/log4j for details of Log4J. Assumes that all configuration of the loggers are done by external configuration (System property "log4j.configurationFile"). Maps logging levels as follows :
    • debug maps to Log4J DEBUG
    • info maps to Log4J INFO
    • warn maps to Log4J WARN
    • error maps to Log4J ERROR
    • fatal maps to Log4J FATAL
    • Constructor Detail

      • Log4J2Logger

        public Log4J2Logger​(String logName)
        Constructor using Log4J.
        Parameters:
        logName - Name of the logging category
    • Method Detail

      • debug

        public void debug​(Object msg)
        Description copied from class: NucleusLogger
        Log a debug message.
        Specified by:
        debug in class NucleusLogger
        Parameters:
        msg - The message
      • debug

        public void debug​(Object msg,
                          Throwable thr)
        Description copied from class: NucleusLogger
        Log a debug message with throwable.
        Specified by:
        debug in class NucleusLogger
        Parameters:
        msg - The message
        thr - A throwable
      • info

        public void info​(Object msg)
        Description copied from class: NucleusLogger
        Log an info message.
        Specified by:
        info in class NucleusLogger
        Parameters:
        msg - The message
      • info

        public void info​(Object msg,
                         Throwable thr)
        Description copied from class: NucleusLogger
        Log an info message with throwable.
        Specified by:
        info in class NucleusLogger
        Parameters:
        msg - The message
        thr - A throwable
      • warn

        public void warn​(Object msg)
        Description copied from class: NucleusLogger
        Log a warning message.
        Specified by:
        warn in class NucleusLogger
        Parameters:
        msg - The message
      • warn

        public void warn​(Object msg,
                         Throwable thr)
        Description copied from class: NucleusLogger
        Log a warning message with throwable.
        Specified by:
        warn in class NucleusLogger
        Parameters:
        msg - The message
        thr - A throwable
      • error

        public void error​(Object msg)
        Description copied from class: NucleusLogger
        Log an error message.
        Specified by:
        error in class NucleusLogger
        Parameters:
        msg - The message
      • error

        public void error​(Object msg,
                          Throwable thr)
        Description copied from class: NucleusLogger
        Log an error message with throwable.
        Specified by:
        error in class NucleusLogger
        Parameters:
        msg - The message
        thr - A throwable
      • fatal

        public void fatal​(Object msg)
        Description copied from class: NucleusLogger
        Log a fatal message.
        Specified by:
        fatal in class NucleusLogger
        Parameters:
        msg - The message
      • fatal

        public void fatal​(Object msg,
                          Throwable thr)
        Description copied from class: NucleusLogger
        Log a fatal message with throwable.
        Specified by:
        fatal in class NucleusLogger
        Parameters:
        msg - The message
        thr - A throwable
      • isDebugEnabled

        public boolean isDebugEnabled()
        Description copied from class: NucleusLogger
        Accessor for whether debug logging is enabled
        Specified by:
        isDebugEnabled in class NucleusLogger
        Returns:
        Whether it is enabled
      • isInfoEnabled

        public boolean isInfoEnabled()
        Description copied from class: NucleusLogger
        Accessor for whether info logging is enabled
        Specified by:
        isInfoEnabled in class NucleusLogger
        Returns:
        Whether it is enabled