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 booleanTrue when the DEBUG level will be logged.static booleanTrue when the ERROR level will be logged.static booleanTrue when the INFO level will be logged.private static intThe level of messages that will be logged.static final intDebug messages.static final intCritical errors.static final intInformative messages.static final intNo logging at all.static final intTrace messages.static final intImportant warnings.private static Log.Loggerstatic booleanTrue when the TRACE level will be logged.static booleanTrue when the WARN level will be logged. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic voidstatic voidstatic voidDEBUG()static voidstatic voidstatic voidstatic voidstatic voidERROR()static voidstatic voidstatic voidstatic voidstatic voidINFO()static voidNONE()static voidset(int level) Sets the level to log.static voidsetLogger(Log.Logger logger) Sets the logger that will write the log messages.static voidstatic voidstatic voidstatic voidstatic voidTRACE()static voidstatic voidstatic voidstatic voidstatic voidWARN()
-
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
-