Class LogLevel

  • All Implemented Interfaces:

    public final class LogLevel
    extends Object
    implements Comparable
    Definition of logging levels for Cargo's logs. A WARN level means only warnings are logged. An INFO level means warnings and infos are logged. A DEBUG level means warnings, info and debug messages are logged.

    Note: There's no ERROR log level as all errors result in an exception being raised.

    • Field Detail

      • WARN

        public static final LogLevel WARN
        Represents a warning logging level.
      • INFO

        public static final LogLevel INFO
        Represents an info logging level.
      • DEBUG

        public static final LogLevel DEBUG
        Represents a debug logging level.
    • Method Detail

      • toLevel

        public static LogLevel toLevel​(String levelAsString)
        Transform a log level represented as a string into a LogLevel object.
        levelAsString - the string to transform
        the LogLevel object
      • hashCode

        public int hashCode()
        hashCode in class Object
      • getLevel

        public String getLevel()
        the log level