Class JRELogger


  • public class JRELogger
    extends NucleusLogger
    JRE logger (java.util.logging) implementation of a NucleusLogger. Assumes that all configuration of the loggers are done by external configuration (System property "java.util.logging.config.file"). Maps logging levels as follows :
    • debug maps to java.util.logging fine
    • info maps to java.util.logging info
    • warn maps to java.util.logging warning
    • error maps to java.util.logging severe
    • fatal maps to java.util.logging severe
    • Constructor Summary

      Constructors 
      Constructor Description
      JRELogger​(java.lang.String logName)
      Constructor for a JRE Logger.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void debug​(java.lang.Object msg)
      Log a debug message.
      void debug​(java.lang.Object msg, java.lang.Throwable thr)
      Log a debug message with throwable.
      void error​(java.lang.Object msg)
      Log an error message.
      void error​(java.lang.Object msg, java.lang.Throwable thr)
      Log an error message with throwable.
      void fatal​(java.lang.Object msg)
      Log a fatal message.
      void fatal​(java.lang.Object msg, java.lang.Throwable thr)
      Log a fatal message with throwable.
      java.lang.Object getNativeLogger()
      Accessor for the native logger object.
      void info​(java.lang.Object msg)
      Log an info message.
      void info​(java.lang.Object msg, java.lang.Throwable thr)
      Log an info message with throwable.
      boolean isDebugEnabled()
      Accessor for whether debug logging is enabled
      boolean isInfoEnabled()
      Accessor for whether info logging is enabled
      private void log​(java.util.logging.Level level, java.lang.Object msg, java.lang.Throwable thrown)  
      void warn​(java.lang.Object msg)
      Log a warning message.
      void warn​(java.lang.Object msg, java.lang.Throwable thr)
      Log a warning message with throwable.
      • Methods inherited from class java.lang.Object

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

      • logger

        private final java.util.logging.Logger logger
        The JRE Logger being used
    • Constructor Detail

      • JRELogger

        public JRELogger​(java.lang.String logName)
        Constructor for a JRE Logger.
        Parameters:
        logName - Name of the logger
    • Method Detail

      • getNativeLogger

        public java.lang.Object getNativeLogger()
        Description copied from class: NucleusLogger
        Accessor for the native logger object.
        Specified by:
        getNativeLogger in class NucleusLogger
        Returns:
        The native logger object
      • debug

        public void debug​(java.lang.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​(java.lang.Object msg,
                          java.lang.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​(java.lang.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​(java.lang.Object msg,
                         java.lang.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​(java.lang.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​(java.lang.Object msg,
                         java.lang.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​(java.lang.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​(java.lang.Object msg,
                          java.lang.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​(java.lang.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​(java.lang.Object msg,
                          java.lang.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
      • log

        private void log​(java.util.logging.Level level,
                         java.lang.Object msg,
                         java.lang.Throwable thrown)