Package org.codehaus.cargo.util.log
Class LogLevel
- java.lang.Object
-
- org.codehaus.cargo.util.log.LogLevel
-
- All Implemented Interfaces:
Comparable<LogLevel>
public final class LogLevel extends Object implements Comparable<LogLevel>
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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(LogLevel level)
boolean
equals(Object object)
String
getLevel()
int
hashCode()
static LogLevel
toLevel(String levelAsString)
Transform a log level represented as a string into aLogLevel
object.String
toString()
-
-
-
Method Detail
-
toLevel
public static LogLevel toLevel(String levelAsString)
Transform a log level represented as a string into aLogLevel
object.- Parameters:
levelAsString
- the string to transform- Returns:
- the
LogLevel
object
-
compareTo
public int compareTo(LogLevel level)
- Specified by:
compareTo
in interfaceComparable<LogLevel>
-
getLevel
public String getLevel()
- Returns:
- the log level
-
-