Class LogLevel


  • public class LogLevel
    extends java.lang.Object
    The LogLevel indicates how relevant and essential information is to be output. All LogEntry instances has a LogLevel, which describe his relevant

    An 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 LogLevel ALL
      A wildcard that all messages can be handle from the Logger, if the logger invokes the setLevel(LogLevel.ALL) method.
      protected boolean async
      Defines the permission, to execute the LogEntries on this Level asynchronously or not.
      protected boolean colorized  
      static LogLevel COMMAND
      The COMMAND level is for the console messages by handling a command from the command input line
      static 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 occurred
      static LogLevel ERROR
      The ERROR level is for important messages like a StackTrace or a error message
      static LogLevel EXTENDED
      The EXTENDED level is for more precise information messages that can be disabled
      static LogLevel FATAL
      The FATAL level is for crashing messages or messages that are so important, that can't describe with ERROR
      static LogLevel IMPORTANT
      The IMPORTANT level is for important messages like "Oh, a bird has hit me!"
      static LogLevel INFO
      The INFO level is the basic level, for normal messages like "The sun is shining"
      protected int level
      Defines the current level as int value
      protected java.lang.String lowerName
      The level name in lower and upper case form.
      protected java.lang.String upperName  
      static LogLevel WARNING
      The WARNING level is for important messages like "WARNING! Your program may crash"
    • Constructor Summary

      Constructors 
      Constructor Description
      LogLevel​(java.lang.String lowerName, java.lang.String upperName, int level, boolean async)  
      LogLevel​(java.lang.String lowerName, java.lang.String upperName, int level, boolean colorized, boolean async)  
    • 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 line

        Disallows 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 message

        Allows 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 ERROR

        Disallows asynchronously ILogHandler invocation

      • EXTENDED

        public static final LogLevel EXTENDED
        The EXTENDED level is for more precise information messages that can be disabled

        Disallows 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 occurred

        Disallows 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.
    • Constructor Detail

      • LogLevel

        public LogLevel​(java.lang.String lowerName,
                        java.lang.String upperName,
                        int level,
                        boolean async)
      • LogLevel

        public LogLevel​(java.lang.String lowerName,
                        java.lang.String upperName,
                        int level,
                        boolean colorized,
                        boolean async)
    • 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()