Package com.bw.jtools

Class Log.LoggerFacade

    • Constructor Summary

      Constructors 
      Constructor Description
      LoggerFacade()  
    • Method Summary

      Modifier and Type Method Description
      abstract void debug​(java.lang.CharSequence msg)
      Logs a debugging message.
      void debug​(java.lang.CharSequence msg, java.lang.Throwable t)
      Logs a warning message error plus message and stack-trace of the Throwable.
      abstract void error​(java.lang.CharSequence msg)
      Logs an error message.
      void error​(java.lang.CharSequence msg, java.lang.Throwable t)
      Logs an error message plus message and stack-trace of the Throwable.
      int getLevel()
      gets the logging level.
      static java.lang.String getLevelPrefix​(int level)  
      abstract void info​(java.lang.CharSequence msg)
      Logs an informational message.
      void info​(java.lang.CharSequence msg, java.lang.Throwable t)
      Logs an informational message error plus message and stack-trace of the Throwable.
      boolean isDebugEnabled()
      Checks if debug log-output is enabled.
      boolean isErrorEnabled()
      Checks if error log-output is enabled.
      boolean isInfoEnabled()
      Checks if informational log-output is enabled.
      boolean isWarnEnabled()
      Checks if warning log-output is enabled.
      void setLevel​(int level)
      Sets the logging level.
      void setMaximumLinesOfStackTrace​(int maxLines)
      Sets the maximum length of stack-trace.
      0 deactivate any stack-traces.
      abstract void warn​(java.lang.CharSequence msg)
      Logs a warning message.
      void warn​(java.lang.CharSequence msg, java.lang.Throwable t)
      Logs a warning message error plus message and stack-trace of the Throwable.
      • Methods inherited from class java.lang.Object

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

      • maxStackTraceLines

        protected int maxStackTraceLines
      • level

        protected int level
    • Constructor Detail

      • LoggerFacade

        public LoggerFacade()
    • Method Detail

      • getLevelPrefix

        public static java.lang.String getLevelPrefix​(int level)
      • setLevel

        public void setLevel​(int level)
        Sets the logging level.
        Parameters:
        level - The level.
      • getLevel

        public int getLevel()
        gets the logging level.
        Returns:
        The level.
      • setMaximumLinesOfStackTrace

        public void setMaximumLinesOfStackTrace​(int maxLines)
        Sets the maximum length of stack-trace.
        0 deactivate any stack-traces.
        Parameters:
        maxLines - The maximum number of lines.
      • error

        public abstract void error​(java.lang.CharSequence msg)
        Logs an error message.
        Parameters:
        msg - The text to log.
      • warn

        public abstract void warn​(java.lang.CharSequence msg)
        Logs a warning message.
        Parameters:
        msg - The text to log.
      • info

        public abstract void info​(java.lang.CharSequence msg)
        Logs an informational message.
        Parameters:
        msg - The text to log.
      • debug

        public abstract void debug​(java.lang.CharSequence msg)
        Logs a debugging message.
        Parameters:
        msg - The text to log.
      • error

        public void error​(java.lang.CharSequence msg,
                          java.lang.Throwable t)
        Logs an error message plus message and stack-trace of the Throwable.
        Parameters:
        msg - The text to log.
        t - The Throwable to trace.
      • warn

        public void warn​(java.lang.CharSequence msg,
                         java.lang.Throwable t)
        Logs a warning message error plus message and stack-trace of the Throwable.
        Parameters:
        msg - The text to log.
        t - The Throwable to trace.
      • info

        public void info​(java.lang.CharSequence msg,
                         java.lang.Throwable t)
        Logs an informational message error plus message and stack-trace of the Throwable.
        Parameters:
        msg - The text to log.
        t - The Throwable to trace.
      • debug

        public void debug​(java.lang.CharSequence msg,
                          java.lang.Throwable t)
        Logs a warning message error plus message and stack-trace of the Throwable.
        Parameters:
        msg - The text to log.
        t - The Throwable to trace.
      • isDebugEnabled

        public boolean isDebugEnabled()
        Checks if debug log-output is enabled.
        Returns:
        true if current log-level is equal to or higher than DEBUG.
      • isInfoEnabled

        public boolean isInfoEnabled()
        Checks if informational log-output is enabled.
        Returns:
        true if current log-level is equal to or higher than INFO.
      • isWarnEnabled

        public boolean isWarnEnabled()
        Checks if warning log-output is enabled.
        Returns:
        true if current log-level is equal to or higher than WARN.
      • isErrorEnabled

        public boolean isErrorEnabled()
        Checks if error log-output is enabled.
        Returns:
        true if current log-level is equal to or higher than WARN.