Class Log


  • public class Log
    extends Object
    A low overhead, lightweight logging system.
    Author:
    Nathan Sweet
    • Field Detail

      • LEVEL_ERROR

        public static final int LEVEL_ERROR
        Critical errors. The application may no longer work correctly.
        See Also:
        Constant Field Values
      • LEVEL_WARN

        public static final int LEVEL_WARN
        Important warnings. The application will continue to work correctly.
        See Also:
        Constant Field Values
      • LEVEL_INFO

        public static final int LEVEL_INFO
        Informative messages. Typically used for deployment.
        See Also:
        Constant Field Values
      • LEVEL_DEBUG

        public static final int LEVEL_DEBUG
        Debug messages. This level is useful during development.
        See Also:
        Constant Field Values
      • LEVEL_TRACE

        public static final int LEVEL_TRACE
        Trace messages. A lot of information is logged, so this level is usually only needed when debugging a problem.
        See Also:
        Constant Field Values
      • ERROR

        public static boolean ERROR
        True when the ERROR level will be logged.
      • WARN

        public static boolean WARN
        True when the WARN level will be logged.
      • INFO

        public static boolean INFO
        True when the INFO level will be logged.
      • DEBUG

        public static boolean DEBUG
        True when the DEBUG level will be logged.
      • TRACE

        public static boolean TRACE
        True when the TRACE level will be logged.
    • Method Detail

      • set

        public static void set​(int level)
        Sets the level to log. If a version of this class is being used that has a final log level, this has no affect.
      • NONE

        public static void NONE()
      • ERROR

        public static void ERROR()
      • WARN

        public static void WARN()
      • INFO

        public static void INFO()
      • DEBUG

        public static void DEBUG()
      • TRACE

        public static void TRACE()
      • setLogger

        public static void setLogger​(Log.Logger logger)
        Sets the logger that will write the log messages.
      • error

        public static void error​(String message)
      • error

        public static void error​(String category,
                                 String message)
      • warn

        public static void warn​(String message)
      • warn

        public static void warn​(String category,
                                String message)
      • info

        public static void info​(String message)
      • info

        public static void info​(String category,
                                String message)
      • debug

        public static void debug​(String message)
      • debug

        public static void debug​(String category,
                                 String message)
      • trace

        public static void trace​(String message)
      • trace

        public static void trace​(String category,
                                 String message)