Class Log

  • All Implemented Interfaces:
    org.apache.commons.logging.Log

    public class Log
    extends java.lang.Object
    implements org.apache.commons.logging.Log
    • Constructor Summary

      Constructors 
      Constructor Description
      Log​(java.lang.String inName)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void debug​(java.lang.Object message)  
      void debug​(java.lang.Object message, java.lang.Throwable t)  
      void error​(java.lang.Object message)  
      void error​(java.lang.Object message, java.lang.Throwable t)  
      void fatal​(java.lang.Object message)  
      void fatal​(java.lang.Object message, java.lang.Throwable t)  
      static java.lang.String getExceptionMsg​(java.lang.Throwable e)  
      private static int getIntLogLevel​(java.lang.String lvl)  
      int getLevel()
      Get logging level.
      private static java.io.InputStream getResourceAsStream​(java.lang.String name)  
      private static java.lang.String getStringProperty​(java.lang.String name)  
      void info​(java.lang.Object message)  
      void info​(java.lang.Object message, java.lang.Throwable t)  
      boolean isDebugEnabled()  
      boolean isErrorEnabled()  
      boolean isFatalEnabled()  
      boolean isInfoEnabled()  
      protected boolean isLevelEnabled​(int logLevel)  
      boolean isTraceEnabled()  
      boolean isWarnEnabled()  
      void resetLevel()
      Reset logging level to congiured level.
      void setLevel​(int currentLogLevel)
      Set logging level.
      void trace​(java.lang.Object message)  
      void trace​(java.lang.Object message, java.lang.Throwable t)  
      void warn​(java.lang.Object message)  
      void warn​(java.lang.Object message, java.lang.Throwable t)  
      • Methods inherited from class java.lang.Object

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

      • clazzname

        java.lang.String clazzname
      • systemPrefix

        protected static final java.lang.String systemPrefix
        All system properties used by OpenAS2 start with this
        See Also:
        Constant Field Values
      • openas2LogProps

        protected static final java.util.Properties openas2LogProps
        Properties loaded from simplelog.properties
      • LOG_LEVEL_TRACE

        public static final int LOG_LEVEL_TRACE
        "Trace" level logging.
        See Also:
        Constant Field Values
      • LOG_LEVEL_DEBUG

        public static final int LOG_LEVEL_DEBUG
        "Debug" level logging.
        See Also:
        Constant Field Values
      • LOG_LEVEL_INFO

        public static final int LOG_LEVEL_INFO
        "Info" level logging.
        See Also:
        Constant Field Values
      • LOG_LEVEL_WARN

        public static final int LOG_LEVEL_WARN
        "Warn" level logging.
        See Also:
        Constant Field Values
      • LOG_LEVEL_ERROR

        public static final int LOG_LEVEL_ERROR
        "Error" level logging.
        See Also:
        Constant Field Values
      • LOG_LEVEL_FATAL

        public static final int LOG_LEVEL_FATAL
        "Fatal" level logging.
        See Also:
        Constant Field Values
      • LOG_LEVEL_ALL

        public static final int LOG_LEVEL_ALL
        Enable all logging levels
        See Also:
        Constant Field Values
      • LOG_LEVEL_OFF

        public static final int LOG_LEVEL_OFF
        Enable no logging levels
        See Also:
        Constant Field Values
      • configuredLogLevel

        protected volatile int configuredLogLevel
        The configured log level
      • currentLogLevel

        protected volatile int currentLogLevel
        The current log level
    • Constructor Detail

      • Log

        public Log​(java.lang.String inName)
    • Method Detail

      • getIntLogLevel

        private static int getIntLogLevel​(java.lang.String lvl)
      • getStringProperty

        private static java.lang.String getStringProperty​(java.lang.String name)
      • resetLevel

        public void resetLevel()
        Reset logging level to congiured level.
      • setLevel

        public void setLevel​(int currentLogLevel)
        Set logging level.
        Parameters:
        currentLogLevel - new logging level
      • getLevel

        public int getLevel()
        Get logging level.
        Returns:
        the current logging level
      • isLevelEnabled

        protected boolean isLevelEnabled​(int logLevel)
      • trace

        public void trace​(java.lang.Object message)
        Specified by:
        trace in interface org.apache.commons.logging.Log
      • trace

        public void trace​(java.lang.Object message,
                          java.lang.Throwable t)
        Specified by:
        trace in interface org.apache.commons.logging.Log
      • debug

        public void debug​(java.lang.Object message)
        Specified by:
        debug in interface org.apache.commons.logging.Log
      • debug

        public void debug​(java.lang.Object message,
                          java.lang.Throwable t)
        Specified by:
        debug in interface org.apache.commons.logging.Log
      • info

        public void info​(java.lang.Object message)
        Specified by:
        info in interface org.apache.commons.logging.Log
      • info

        public void info​(java.lang.Object message,
                         java.lang.Throwable t)
        Specified by:
        info in interface org.apache.commons.logging.Log
      • warn

        public void warn​(java.lang.Object message)
        Specified by:
        warn in interface org.apache.commons.logging.Log
      • warn

        public void warn​(java.lang.Object message,
                         java.lang.Throwable t)
        Specified by:
        warn in interface org.apache.commons.logging.Log
      • error

        public void error​(java.lang.Object message)
        Specified by:
        error in interface org.apache.commons.logging.Log
      • error

        public void error​(java.lang.Object message,
                          java.lang.Throwable t)
        Specified by:
        error in interface org.apache.commons.logging.Log
      • fatal

        public void fatal​(java.lang.Object message)
        Specified by:
        fatal in interface org.apache.commons.logging.Log
      • fatal

        public void fatal​(java.lang.Object message,
                          java.lang.Throwable t)
        Specified by:
        fatal in interface org.apache.commons.logging.Log
      • isDebugEnabled

        public boolean isDebugEnabled()
        Specified by:
        isDebugEnabled in interface org.apache.commons.logging.Log
      • isErrorEnabled

        public boolean isErrorEnabled()
        Specified by:
        isErrorEnabled in interface org.apache.commons.logging.Log
      • isFatalEnabled

        public boolean isFatalEnabled()
        Specified by:
        isFatalEnabled in interface org.apache.commons.logging.Log
      • isInfoEnabled

        public boolean isInfoEnabled()
        Specified by:
        isInfoEnabled in interface org.apache.commons.logging.Log
      • isTraceEnabled

        public boolean isTraceEnabled()
        Specified by:
        isTraceEnabled in interface org.apache.commons.logging.Log
      • isWarnEnabled

        public boolean isWarnEnabled()
        Specified by:
        isWarnEnabled in interface org.apache.commons.logging.Log
      • getResourceAsStream

        private static java.io.InputStream getResourceAsStream​(java.lang.String name)
      • getExceptionMsg

        public static java.lang.String getExceptionMsg​(java.lang.Throwable e)