Class LogLevel

java.lang.Object
fr.uga.pddl4j.planners.LogLevel
All Implemented Interfaces:
Serializable, picocli.CommandLine.ITypeConverter<LogLevel>

public class LogLevel extends Object implements Serializable, picocli.CommandLine.ITypeConverter<LogLevel>
This class implements the log level for the trace of the planners.
Since:
4.0
See Also:
Serialized Form
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static LogLevel
    All levels including custom levels.
    static LogLevel
    Designates fine-grained informational events that are most useful to debug an application.
    static org.apache.logging.log4j.Level
    The default level of the log.
    static LogLevel
    Designates error events that might still allow the application to continue running.
    static LogLevel
    Designates very severe error events that will presumably lead the application to abort.
    static LogLevel
    Designates informational messages that highlight the progress of the application at coarse-grained level.
    static LogLevel
    The highest possible rank and is intended to turn off logging.
    static LogLevel
    Designates finer-grained informational events than the DEBUG.
    static LogLevel
    Designates potentially harmful situations.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a log level with the default level.
    LogLevel​(String level)
    Creates a log level with a specified level as a string.
    LogLevel​(org.apache.logging.log4j.Level level)
    Creates a log level with a specified level.
  • Method Summary

    Modifier and Type
    Method
    Description
    convert​(String value)
    Convert a string value into a log level.
    boolean
    equals​(Object obj)
    Returns if this object is equals to another.
    org.apache.logging.log4j.Level
    Returns the level.
    int
    Returns the hash code value of this object.
    void
    setLevel​(org.apache.logging.log4j.Level level)
    Sets the level.
    Returns a string representation of this log.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • OFF

      public static final LogLevel OFF
      The highest possible rank and is intended to turn off logging.
    • FATAL

      public static final LogLevel FATAL
      Designates very severe error events that will presumably lead the application to abort.
    • ERROR

      public static final LogLevel ERROR
      Designates error events that might still allow the application to continue running.
    • WARM

      public static final LogLevel WARM
      Designates potentially harmful situations.
    • INFO

      public static final LogLevel INFO
      Designates informational messages that highlight the progress of the application at coarse-grained level.
    • DEBUG

      public static final LogLevel DEBUG
      Designates fine-grained informational events that are most useful to debug an application.
    • TRACE

      public static final LogLevel TRACE
      Designates finer-grained informational events than the DEBUG.
    • ALL

      public static final LogLevel ALL
      All levels including custom levels.
    • DEFAULT_LEVEL

      public static final org.apache.logging.log4j.Level DEFAULT_LEVEL
      The default level of the log.
  • Constructor Details

    • LogLevel

      public LogLevel()
      Creates a log level with the default level.
    • LogLevel

      public LogLevel(org.apache.logging.log4j.Level level)
      Creates a log level with a specified level.
      Parameters:
      level - the level.
    • LogLevel

      public LogLevel(String level)
      Creates a log level with a specified level as a string.
      Parameters:
      level - the sting level.
  • Method Details

    • setLevel

      public final void setLevel(org.apache.logging.log4j.Level level)
      Sets the level.
      Parameters:
      level - the level.
    • getLevel

      public final org.apache.logging.log4j.Level getLevel()
      Returns the level.
      Returns:
      the level.
    • convert

      public LogLevel convert(String value) throws IllegalArgumentException
      Convert a string value into a log level. The string accepted are: ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN. The string value in parameter is not case-sensitive.
      Specified by:
      convert in interface picocli.CommandLine.ITypeConverter<LogLevel>
      Parameters:
      value - the string value to be converted.
      Returns:
      the log corresponding.
      Throws:
      IllegalArgumentException - if the value cannot be converted into a log lĀ©evel.
    • equals

      public boolean equals(Object obj)
      Returns if this object is equals to another.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to be compared
      Returns:
      true if this object is equals to the object in parameter false otherwise.
    • hashCode

      public int hashCode()
      Returns the hash code value of this object.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code value of this object.
    • toString

      public String toString()
      Returns a string representation of this log.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this log.