java.lang.Object
java.lang.Enum<LogLevel>
com.winterhavenmc.library.messagebuilder.validation.LogLevel
All Implemented Interfaces:
Serializable, Comparable<LogLevel>, Constable

public enum LogLevel extends Enum<LogLevel>
Represents standard log severity levels used for validation feedback and internal diagnostics.

This enum serves as a semantic bridge between commonly used log level names (such as TRACE, WARN, ERROR) and their corresponding Level constants.

It is used primarily in situations where validation failures or warnings are logged rather than thrown as exceptions.

Example usage:

    logger.log(LogLevel.WARN.toJavaUtilLevel(), "Validation issue detected...");
See Also:
  • Enum Constant Details

    • TRACE

      public static final LogLevel TRACE
      The lowest level of logging, typically used for very fine-grained tracing. Maps to Level.FINEST.
    • DEBUG

      public static final LogLevel DEBUG
      A fine-grained debug message. Maps to Level.FINER.
    • INFO

      public static final LogLevel INFO
      A standard informational message. Maps to Level.INFO.
    • WARN

      public static final LogLevel WARN
      A warning that indicates a potential issue or recoverable problem. Maps to Level.WARNING.
    • ERROR

      public static final LogLevel ERROR
      A serious error that should be brought to immediate attention. Maps to Level.SEVERE.
  • 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
    • toJavaUtilLevel

      public Level toJavaUtilLevel()
      Returns the corresponding Level for this log level.
      Returns:
      the mapped java.util.logging.Level