Class Log


  • public final class Log
    extends Object
    Openfire makes use of a logging facade (slf4j) to manage its log output. The facade is backed up by Log4j by default. This class provides utility methods.

    Additionally, this class provides methods that can be used to record logging statements. These methods are exact duplicates of the previous Log implementation of Openfire and are kept for backwards-compatibility (the are deprecated). These methods will delegate logging functionality to slf4j. Instead of these methods, slf4j logging functionality should be used directly.

    Author:
    Guus der Kinderen, guus.der.kinderen@gmail.com
    See Also:
    http://www.slf4j.org/
    • Constructor Detail

      • Log

        public Log()
    • Method Detail

      • isErrorEnabled

        @Deprecated
        public static boolean isErrorEnabled()
        Deprecated.
        replaced by Logger.isErrorEnabled(). Functionality of this method is delegated there.
        Returns:
        true if logging is enabed, otherwise false
      • isDebugEnabled

        @Deprecated
        public static boolean isDebugEnabled()
        Deprecated.
        replaced by Logger.isDebugEnabled(). Functionality of this method is delegated there.
        Returns:
        true if logging is enabed, otherwise false
      • setDebugEnabled

        public static void setDebugEnabled​(boolean enabled)
      • setTraceEnabled

        public static void setTraceEnabled​(boolean enabled)
      • isInfoEnabled

        @Deprecated
        public static boolean isInfoEnabled()
        Deprecated.
        replaced by Logger.isInfoEnabled(). Functionality of this method is delegated there.
        Returns:
        true if logging is enabed, otherwise false
      • isWarnEnabled

        @Deprecated
        public static boolean isWarnEnabled()
        Deprecated.
        replaced by Logger.isWarnEnabled(). Functionality of this method is delegated there.
        Returns:
        true if logging is enabed, otherwise false
      • debug

        @Deprecated
        public static void debug​(String s)
        Deprecated.
        replaced by Logger.debug(String). Functionality of this method is delegated there.
        Parameters:
        s - the string to log
      • debug

        @Deprecated
        public static void debug​(Throwable throwable)
        Deprecated.
        replaced by Logger.debug(String, Throwable). Functionality of this method is delegated there.
        Parameters:
        throwable - the throwable to log
      • debug

        @Deprecated
        public static void debug​(String s,
                                 Throwable throwable)
        Deprecated.
        replaced by Logger.debug(String, Throwable). Functionality of this method is delegated there.
        Parameters:
        s - the string to log
        throwable - the throwable to log
      • markDebugLogFile

        public static void markDebugLogFile​(String username)
      • rotateDebugLogFile

        public static void rotateDebugLogFile()
      • info

        @Deprecated
        public static void info​(String s)
        Deprecated.
        replaced by Logger.info(String). Functionality of this method is delegated there.
        Parameters:
        s - the string to log
      • info

        @Deprecated
        public static void info​(Throwable throwable)
        Deprecated.
        replaced by Logger.info(String, Throwable). Functionality of this method is delegated there.
        Parameters:
        throwable - the throwable to log
      • info

        @Deprecated
        public static void info​(String s,
                                Throwable throwable)
        Deprecated.
        replaced by Logger.info(String, Throwable). Functionality of this method is delegated there.
        Parameters:
        s - the string to log
        throwable - the throwable to log
      • markInfoLogFile

        public static void markInfoLogFile​(String username)
      • rotateInfoLogFile

        public static void rotateInfoLogFile()
      • warn

        @Deprecated
        public static void warn​(String s)
        Deprecated.
        replaced by Logger.warn(String). Functionality of this method is delegated there.
        Parameters:
        s - the string to log
      • warn

        @Deprecated
        public static void warn​(Throwable throwable)
        Deprecated.
        replaced by Logger.warn(String, Throwable). Functionality of this method is delegated there.
        Parameters:
        throwable - the throwable to log
      • warn

        @Deprecated
        public static void warn​(String s,
                                Throwable throwable)
        Deprecated.
        replaced by Logger.debug(String, Throwable). Functionality of this method is delegated there.
        Parameters:
        s - the string to log
        throwable - the throwable to log
      • markWarnLogFile

        public static void markWarnLogFile​(String username)
      • rotateWarnLogFile

        public static void rotateWarnLogFile()
      • error

        @Deprecated
        public static void error​(String s)
        Deprecated.
        replaced by Logger.error(String). Functionality of this method is delegated there.
        Parameters:
        s - the string to log
      • error

        @Deprecated
        public static void error​(Throwable throwable)
        Deprecated.
        replaced by Logger.error(String, Throwable). Functionality of this method is delegated there.
        Parameters:
        throwable - the throwable to log
      • error

        @Deprecated
        public static void error​(String s,
                                 Throwable throwable)
        Deprecated.
        replaced by Logger.error(String, Throwable). Functionality of this method is delegated there.
        Parameters:
        s - the string to log
        throwable - the throwable to log
      • markErrorLogFile

        public static void markErrorLogFile​(String username)
      • rotateErrorLogFile

        public static void rotateErrorLogFile()
      • rotateAllLogFile

        public static void rotateAllLogFile()
      • getLogDirectory

        public static String getLogDirectory()
        Returns the directory that log files exist in. The directory name will have a File.separator as the last character in the string.
        Returns:
        the directory that log files exist in.