Enum Class CliLogLevel

java.lang.Object
java.lang.Enum<CliLogLevel>
io.github.mmm.cli.io.CliLogLevel
All Implemented Interfaces:
Serializable, Comparable<CliLogLevel>, Constable

public enum CliLogLevel extends Enum<CliLogLevel>
Enum for the levels to log to a CliConsoleImpl.
  • Enum Constant Details

    • DEBUG

      public static final CliLogLevel DEBUG
      Debug information with details for developers and to get more details in case of problems or errors.
    • INFO

      public static final CliLogLevel INFO
      General information for end-users to get helpful feedback about what is going on.
    • WARNING

      public static final CliLogLevel WARNING
      Warning information if something is not as expected but does not prevent further processing.
    • ERROR

      public static final CliLogLevel ERROR
      Error information if something went wrong and processing typically failed and has to be aborted.
  • Method Details

    • values

      public static CliLogLevel[] 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 CliLogLevel 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
    • includes

      public boolean includes(CliLogLevel level)
      Parameters:
      level - the CliLogLevel to check (e.g. that is going to be logged).
      Returns:
      true if this CliLogLevel includes the given CliLogLevel, false otherwise. In other words this method checks if the severity of the given CliLogLevel is greater or equal to this CliLogLevel. So if this method is invoked on the current log-level of the CliConsole with the level to log the result will indicate if the message should be logged (or in case of false be suppressed).