Enum Class LoggyLevel

java.lang.Object
java.lang.Enum<LoggyLevel>
fr.diskmth.loggy.LoggyLevel
All Implemented Interfaces:
Serializable, Comparable<LoggyLevel>, Constable

public enum LoggyLevel extends Enum<LoggyLevel>
LoggyLevel represents the possible logging levels for a log statement. The levels are: FATAL, ERROR, WARN, INFO, and DEBUG.
Since:
Loggy 1.4
  • Enum Constant Details

  • Method Details

    • values

      public static LoggyLevel[] 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 LoggyLevel 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
    • fromJavaLevel

      public static LoggyLevel fromJavaLevel(Level level)
      Returns the corresponding LoggyLevel enum value based on the input Java logging level.
      Parameters:
      level - the Java logging level to be converted to a LoggyLevel enum value.
      Returns:
      the LoggyLevel enum value that corresponds to the input Java logging level.
    • toJavaLevel

      public Level toJavaLevel()
      Returns the corresponding Java logging level based on this LoggyLevel enum value.
      Returns:
      the Java logging level that corresponds to this LoggyLevel enum value.