Package com.esotericsoftware.minlog
Class Log
java.lang.Object
com.esotericsoftware.minlog.Log
A low overhead, lightweight logging system.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic boolean
True when the DEBUG level will be logged.static boolean
True when the ERROR level will be logged.static boolean
True when the INFO level will be logged.private static int
The level of messages that will be logged.static final int
Debug messages.static final int
Critical errors.static final int
Informative messages.static final int
No logging at all.static final int
Trace messages.static final int
Important warnings.private static Log.Logger
static boolean
True when the TRACE level will be logged.static boolean
True when the WARN level will be logged. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
static void
static void
static void
DEBUG()
static void
static void
static void
static void
static void
ERROR()
static void
static void
static void
static void
static void
INFO()
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
static void
static void
static void
static void
TRACE()
static void
static void
static void
static void
static void
WARN()
-
Field Details
-
LEVEL_NONE
public static final int LEVEL_NONENo logging at all.- See Also:
-
LEVEL_ERROR
public static final int LEVEL_ERRORCritical errors. The application may no longer work correctly.- See Also:
-
LEVEL_WARN
public static final int LEVEL_WARNImportant warnings. The application will continue to work correctly.- See Also:
-
LEVEL_INFO
public static final int LEVEL_INFOInformative messages. Typically used for deployment.- See Also:
-
LEVEL_DEBUG
public static final int LEVEL_DEBUGDebug messages. This level is useful during development.- See Also:
-
LEVEL_TRACE
public static final int LEVEL_TRACETrace messages. A lot of information is logged, so this level is usually only needed when debugging a problem.- See Also:
-
level
private static int levelThe level of messages that will be logged. Compiling this and the booleans below as "final" will cause the compiler to remove all "if (Log.info) ..." type statements below the set level. -
ERROR
public static boolean ERRORTrue when the ERROR level will be logged. -
WARN
public static boolean WARNTrue when the WARN level will be logged. -
INFO
public static boolean INFOTrue when the INFO level will be logged. -
DEBUG
public static boolean DEBUGTrue when the DEBUG level will be logged. -
TRACE
public static boolean TRACETrue when the TRACE level will be logged. -
logger
-
-
Constructor Details
-
Log
private Log()
-
-
Method Details
-
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
Sets the logger that will write the log messages. -
error
-
error
-
error
-
error
-
warn
-
warn
-
warn
-
warn
-
info
-
info
-
info
-
info
-
debug
-
debug
-
debug
-
debug
-
trace
-
trace
-
trace
-
trace
-