Class JDKLogger

  • All Implemented Interfaces:
    Logger

    public class JDKLogger
    extends java.lang.Object
    implements Logger
    Provides a logger using the JDK logging facilities.
    • Constructor Summary

      Constructors 
      Constructor Description
      JDKLogger​(java.lang.Class c)
      Creates a logger.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void debug​(java.lang.String msg)
      Logs a message at this level.
      void debug​(java.lang.String format, java.lang.Object... arg)
      Logs a message at this level.
      void debug​(java.lang.String msg, java.lang.Throwable t)
      Logs a message at this level.
      void error​(java.lang.String msg)
      Logs a message at this level.
      void error​(java.lang.String format, java.lang.Object... arg)
      Logs a message at this level.
      void error​(java.lang.String msg, java.lang.Throwable t)
      Logs a message at this level.
      protected java.lang.String[] getCaller()
      returns an array (class, method) of the caller before our logger class in the stack
      void info​(java.lang.String msg)
      Logs a message at this level.
      void info​(java.lang.String format, java.lang.Object... arg)
      Logs a message at this level.
      void info​(java.lang.String msg, java.lang.Throwable t)
      Logs a message at this level.
      boolean isDebugEnabled()  
      boolean isErrorEnabled()  
      boolean isInfoEnabled()  
      boolean isTraceEnabled()  
      boolean isWarningEnabled()  
      protected void log​(java.util.logging.Level l, java.lang.String f, java.lang.Object... a)  
      protected void log​(java.util.logging.Level l, java.lang.String m, java.lang.Throwable t)  
      void trace​(java.lang.String msg)  
      void trace​(java.lang.String format, java.lang.Object... arg)  
      void trace​(java.lang.String msg, java.lang.Throwable t)  
      void warning​(java.lang.String msg)  
      void warning​(java.lang.String format, java.lang.Object... arg)  
      void warning​(java.lang.String msg, java.lang.Throwable t)  
      • Methods inherited from class java.lang.Object

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

      • JDKLogger

        public JDKLogger​(java.lang.Class c)
        Creates a logger.
        Parameters:
        c - the class to use for naming this logger.
    • Method Detail

      • debug

        public void debug​(java.lang.String msg)
        Description copied from interface: Logger
        Logs a message at this level.
        Specified by:
        debug in interface Logger
        Parameters:
        msg - the message to log
      • debug

        public void debug​(java.lang.String format,
                          java.lang.Object... arg)
        Description copied from interface: Logger
        Logs a message at this level.
        Specified by:
        debug in interface Logger
        Parameters:
        format - the message to log
        arg - formatting arguments for the message
      • debug

        public void debug​(java.lang.String msg,
                          java.lang.Throwable t)
        Description copied from interface: Logger
        Logs a message at this level.
        Specified by:
        debug in interface Logger
        Parameters:
        msg - the message to log
        t - the Throwable to log
      • error

        public void error​(java.lang.String msg)
        Description copied from interface: Logger
        Logs a message at this level.
        Specified by:
        error in interface Logger
        Parameters:
        msg - the message to log
      • error

        public void error​(java.lang.String format,
                          java.lang.Object... arg)
        Description copied from interface: Logger
        Logs a message at this level.
        Specified by:
        error in interface Logger
        Parameters:
        format - the message to log
        arg - formatting arguments for the message formatting arguments for the message
      • error

        public void error​(java.lang.String msg,
                          java.lang.Throwable t)
        Description copied from interface: Logger
        Logs a message at this level.
        Specified by:
        error in interface Logger
        Parameters:
        msg - the message to log
        t - the Throwable to log
      • info

        public void info​(java.lang.String msg)
        Description copied from interface: Logger
        Logs a message at this level.
        Specified by:
        info in interface Logger
        Parameters:
        msg - the message to log
      • info

        public void info​(java.lang.String format,
                         java.lang.Object... arg)
        Description copied from interface: Logger
        Logs a message at this level.
        Specified by:
        info in interface Logger
        Parameters:
        format - the message to log
        arg - formatting arguments for the message
      • info

        public void info​(java.lang.String msg,
                         java.lang.Throwable t)
        Description copied from interface: Logger
        Logs a message at this level.
        Specified by:
        info in interface Logger
        Parameters:
        msg - the message to log
        t - the Throwable to log the Throwable to log
      • isDebugEnabled

        public boolean isDebugEnabled()
        Specified by:
        isDebugEnabled in interface Logger
        Returns:
        true if logging is enabled at this level
      • isErrorEnabled

        public boolean isErrorEnabled()
        Specified by:
        isErrorEnabled in interface Logger
        Returns:
        true if logging is enabled at this level
      • isInfoEnabled

        public boolean isInfoEnabled()
        Specified by:
        isInfoEnabled in interface Logger
        Returns:
        true if logging is enabled at this level
      • isTraceEnabled

        public boolean isTraceEnabled()
        Specified by:
        isTraceEnabled in interface Logger
        Returns:
        true if logging is enabled at this level
      • isWarningEnabled

        public boolean isWarningEnabled()
        Specified by:
        isWarningEnabled in interface Logger
        Returns:
        true if logging is enabled at this level
      • trace

        public void trace​(java.lang.String msg)
        Specified by:
        trace in interface Logger
        Parameters:
        msg - the message to log
      • trace

        public void trace​(java.lang.String format,
                          java.lang.Object... arg)
        Specified by:
        trace in interface Logger
        Parameters:
        format - the message to log
        arg - formatting arguments for the message
      • trace

        public void trace​(java.lang.String msg,
                          java.lang.Throwable t)
        Specified by:
        trace in interface Logger
        Parameters:
        msg - the message to log
        t - the Throwable to log
      • warning

        public void warning​(java.lang.String msg)
        Specified by:
        warning in interface Logger
        Parameters:
        msg - the message to log
      • warning

        public void warning​(java.lang.String format,
                            java.lang.Object... arg)
        Specified by:
        warning in interface Logger
        Parameters:
        format - the message to log
        arg - formatting arguments for the message
      • warning

        public void warning​(java.lang.String msg,
                            java.lang.Throwable t)
        Specified by:
        warning in interface Logger
        Parameters:
        msg - the message to log
        t - the Throwable to log
      • getCaller

        protected java.lang.String[] getCaller()
        returns an array (class, method) of the caller before our logger class in the stack
      • log

        protected void log​(java.util.logging.Level l,
                           java.lang.String f,
                           java.lang.Object... a)
      • log

        protected void log​(java.util.logging.Level l,
                           java.lang.String m,
                           java.lang.Throwable t)