Enum Class LogLevel

java.lang.Object
java.lang.Enum<LogLevel>
me.deecaad.core.utils.LogLevel
All Implemented Interfaces:
Serializable, Comparable<LogLevel>, Constable

public enum LogLevel extends Enum<LogLevel>
This enum outlines the different levels that messages can be logged at. Less important messages have larger numeric levels, and more important messages have smaller numeric levels.
  • Enum Constant Details

    • INFO

      public static final LogLevel INFO
    • ERROR

      public static final LogLevel ERROR
    • WARN

      public static final LogLevel WARN
    • DEBUG

      public static final LogLevel DEBUG
  • Method Details

    • values

      public static LogLevel[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LogLevel valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • shouldPrint

      public boolean shouldPrint(int level)
      Returns true if this level can be logged to console, given the number level from user input.
      Parameters:
      level - Non-negative numeric level. Should be defined by the user.
      Returns:
      true if this level can be logged.
    • getParallel

      public Level getParallel()
      Returns the java logging level that corresponds to this logging level.
      Returns:
      The non-null corresponding java logging level.