org.codehaus.cargo.util.log
Class LogLevel

java.lang.Object
  extended by org.codehaus.cargo.util.log.LogLevel
All Implemented Interfaces:
Comparable

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.

Version:
$Id: LogLevel.java 1705 2008-09-02 13:14:55Z adriana $

Field Summary
static LogLevel DEBUG
          Represents a debug logging level.
static LogLevel INFO
          Represents an info logging level.
static LogLevel WARN
          Represents a warning logging level.
 
Method Summary
 int compareTo(Object object)
          
 boolean equals(Object object)
          
 String getLevel()
           
 int hashCode()
          
static LogLevel toLevel(String levelAsString)
          Transform a log level represented as a string into a LogLevel object.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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.

Parameters:
levelAsString - the string to transform
Returns:
the LogLevel object

equals

public boolean equals(Object object)

Overrides:
equals in class Object
See Also:
Object.equals(Object)

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

compareTo

public int compareTo(Object object)

Specified by:
compareTo in interface Comparable
See Also:
Comparable.compareTo(Object)

getLevel

public String getLevel()
Returns:
the log level

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2004-2012 Codehaus. All Rights Reserved.