Class LogLevel

  • All Implemented Interfaces:
    ILevelable

    public class LogLevel
    extends java.lang.Object
    implements ILevelable
    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.
      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 crashing messages or messages that are so important, that can
      static LogLevel ERROR
      The ERROR level is for important messages like a StackTrace or a error message
      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
      The level name in lower and upper case form.
      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)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getLevel()
      Returns the current configured access level.
      java.lang.String getLowerName()  
      java.lang.String getUpperName()  
      boolean isAsync()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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

      • DEBUG

        public static final LogLevel DEBUG
        The DEBUG level is for crashing messages or messages that are so important, that can

        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
        The level name in lower and upper case form. It is important fort the format of the end messages
      • level

        protected int level
        Defines the current level as int value
      • 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)
    • Method Detail

      • getLowerName

        public java.lang.String getLowerName()
      • getUpperName

        public java.lang.String getUpperName()
      • getLevel

        public int getLevel()
        Description copied from interface: ILevelable
        Returns the current configured access level. All log entries under this level can be only noticed
        Specified by:
        getLevel in interface ILevelable
      • isAsync

        public boolean isAsync()