Class Log4JLogger

    • Field Detail

      • l4jLogger

        private final org.apache.log4j.Logger l4jLogger
    • Constructor Detail

      • Log4JLogger

        public Log4JLogger​(java.lang.String name)
        Get an instance of Log4JLogger.
    • Method Detail

      • isTraceEnabled

        public boolean isTraceEnabled()
        Description copied from interface: Logger
        Checks whether TRACE logging is enabled. This may return true, even when the logger is configured to not put the resulting output anywhere. You can use this method to avoid potential expensive (debugging) code when there is no need for it since it will be dropped anyway:
        
        if (log.isTraceEnabled()) {
          ... expensive code here ...
          log.trace(result);
        }
         
        Returns:
        true if trace messages would be displayed.
      • isDebugEnabled

        public boolean isDebugEnabled()
        Description copied from class: AbstractLogger
        True if debug is enabled for this logger. Default implementation always returns false
        Specified by:
        isDebugEnabled in interface Logger
        Specified by:
        isDebugEnabled in class AbstractLogger
        Returns:
        true if debug messages would be displayed
      • isInfoEnabled

        public boolean isInfoEnabled()
        Description copied from class: AbstractLogger
        True if debug is enabled for this logger. Default implementation always returns false
        Specified by:
        isInfoEnabled in interface Logger
        Specified by:
        isInfoEnabled in class AbstractLogger
        Returns:
        true if info messages would be displayed
      • log

        public void log​(Level level,
                        java.lang.Object message,
                        java.lang.Throwable e)
        Wrapper around log4j.
        Specified by:
        log in interface Logger
        Specified by:
        log in class AbstractLogger
        Parameters:
        level - net.spy.compat.log.Level level.
        message - object message
        e - optional throwable