Class LogLevel
- java.lang.Object
-
- de.dytanic.cloudnet.common.logging.LogLevel
-
public class LogLevel extends java.lang.ObjectThe LogLevel indicates how relevant and essential information is to be output. All LogEntry instances has a LogLevel, which describe his relevantAn LogLevel configure the async log printing feature for the logger, if the logger implementation support asynchronously ILogHandler invocation
- See Also:
LogEntry
-
-
Field Summary
Fields Modifier and Type Field Description static LogLevelALLA wildcard that all messages can be handle from the Logger, if the logger invokes the setLevel(LogLevel.ALL) method.protected booleanasyncDefines the permission, to execute the LogEntries on this Level asynchronously or not.protected booleancolorizedstatic LogLevelCOMMANDThe COMMAND level is for the console messages by handling a command from the command input linestatic LogLevelDEBUGThe DEBUG level is for all debugging messages, that are not important for CloudNet's runtime but may be useful if an error occurredstatic LogLevelERRORThe ERROR level is for important messages like a StackTrace or a error messagestatic LogLevelEXTENDEDThe EXTENDED level is for more precise information messages that can be disabledstatic LogLevelFATALThe FATAL level is for crashing messages or messages that are so important, that can't describe with ERRORstatic LogLevelIMPORTANTThe IMPORTANT level is for important messages like "Oh, a bird has hit me!"static LogLevelINFOThe INFO level is the basic level, for normal messages like "The sun is shining"protected intlevelDefines the current level as int valueprotected java.lang.StringlowerNameThe level name in lower and upper case form.protected java.lang.StringupperNamestatic LogLevelWARNINGThe WARNING level is for important messages like "WARNING! Your program may crash"
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Optional<LogLevel>getDefaultLogLevel(java.lang.String name)intgetLevel()java.lang.StringgetLowerName()java.lang.StringgetUpperName()booleanisAsync()booleanisColorized()
-
-
-
Field Detail
-
INFO
public static final LogLevel INFO
The INFO level is the basic level, for normal messages like "The sun is shining"Allows asynchronously ILogHandler invocation
-
IMPORTANT
public static final LogLevel IMPORTANT
The IMPORTANT level is for important messages like "Oh, a bird has hit me!"Allows asynchronously ILogHandler invocation
-
COMMAND
public static final LogLevel COMMAND
The COMMAND level is for the console messages by handling a command from the command input lineDisallows asynchronously ILogHandler invocation
-
WARNING
public static final LogLevel WARNING
The WARNING level is for important messages like "WARNING! Your program may crash"Allows asynchronously ILogHandler invocation
-
ERROR
public static final LogLevel ERROR
The ERROR level is for important messages like a StackTrace or a error messageAllows asynchronously ILogHandler invocation
-
FATAL
public static final LogLevel FATAL
The FATAL level is for crashing messages or messages that are so important, that can't describe with ERRORDisallows asynchronously ILogHandler invocation
-
EXTENDED
public static final LogLevel EXTENDED
The EXTENDED level is for more precise information messages that can be disabledDisallows asynchronously ILogHandler invocation
-
DEBUG
public static final LogLevel DEBUG
The DEBUG level is for all debugging messages, that are not important for CloudNet's runtime but may be useful if an error occurredDisallows asynchronously ILogHandler invocation
-
ALL
public static final LogLevel ALL
A wildcard that all messages can be handle from the Logger, if the logger invokes the setLevel(LogLevel.ALL) method.
-
lowerName
protected java.lang.String lowerName
The level name in lower and upper case form. It is important fort the format of the end messages
-
upperName
protected java.lang.String upperName
-
level
protected int level
Defines the current level as int value
-
colorized
protected boolean colorized
-
async
protected boolean async
Defines the permission, to execute the LogEntries on this Level asynchronously or not.
-
-
Method Detail
-
getDefaultLogLevel
public static java.util.Optional<LogLevel> getDefaultLogLevel(java.lang.String name)
-
getLowerName
public java.lang.String getLowerName()
-
getUpperName
public java.lang.String getUpperName()
-
getLevel
public int getLevel()
-
isAsync
public boolean isAsync()
-
isColorized
public boolean isColorized()
-
-