com.esotericsoftware.minlog
Class Log

java.lang.Object
  extended by com.esotericsoftware.minlog.Log

public class Log
extends Object

A low overhead, lightweight logging system.

Author:
Nathan Sweet

Nested Class Summary
static class Log.Logger
          Performs the actual logging.
 
Field Summary
static boolean DEBUG
          True when the DEBUG level will be logged.
static boolean ERROR
          True when the ERROR level will be logged.
static boolean INFO
          True when the INFO level will be logged.
static int LEVEL_DEBUG
          Debug messages.
static int LEVEL_ERROR
          Critical errors.
static int LEVEL_INFO
          Informative messages.
static int LEVEL_NONE
          No logging at all.
static int LEVEL_TRACE
          Trace messages.
static int LEVEL_WARN
          Important warnings.
static boolean TRACE
          True when the TRACE level will be logged.
static boolean WARN
          True when the WARN level will be logged.
 
Method Summary
static void DEBUG()
           
static void debug(String message)
           
static void debug(String category, String message)
           
static void debug(String category, String message, Throwable ex)
           
static void debug(String message, Throwable ex)
           
static void ERROR()
           
static void error(String message)
           
static void error(String category, String message)
           
static void error(String category, String message, Throwable ex)
           
static void error(String message, Throwable ex)
           
static void INFO()
           
static void info(String message)
           
static void info(String category, String message)
           
static void info(String category, String message, Throwable ex)
           
static void info(String message, Throwable ex)
           
static void NONE()
           
static void set(int level)
          Sets the level to log.
static void setLogger(Log.Logger logger)
          Sets the logger that will write the log messages.
static void TRACE()
           
static void trace(String message)
           
static void trace(String category, String message)
           
static void trace(String category, String message, Throwable ex)
           
static void trace(String message, Throwable ex)
           
static void WARN()
           
static void warn(String message)
           
static void warn(String category, String message)
           
static void warn(String category, String message, Throwable ex)
           
static void warn(String message, Throwable ex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEVEL_NONE

public static final int LEVEL_NONE
No logging at all.

See Also:
Constant Field Values

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,
                         Throwable ex)

error

public static void error(String category,
                         String message,
                         Throwable ex)

error

public static void error(String message)

error

public static void error(String category,
                         String message)

warn

public static void warn(String message,
                        Throwable ex)

warn

public static void warn(String category,
                        String message,
                        Throwable ex)

warn

public static void warn(String message)

warn

public static void warn(String category,
                        String message)

info

public static void info(String message,
                        Throwable ex)

info

public static void info(String category,
                        String message,
                        Throwable ex)

info

public static void info(String message)

info

public static void info(String category,
                        String message)

debug

public static void debug(String message,
                         Throwable ex)

debug

public static void debug(String category,
                         String message,
                         Throwable ex)

debug

public static void debug(String message)

debug

public static void debug(String category,
                         String message)

trace

public static void trace(String message,
                         Throwable ex)

trace

public static void trace(String category,
                         String message,
                         Throwable ex)

trace

public static void trace(String message)

trace

public static void trace(String category,
                         String message)


Copyright © 2013. All rights reserved.