tuwien.auto.calimero.log
Class LogLevel

java.lang.Object
  extended by tuwien.auto.calimero.log.LogLevel

public class LogLevel
extends java.lang.Object

Defines different log levels.

Defines several severity levels used to categorize logging information and loggers. It also gives a clue about the chattiness of the respective object.


Field Summary
static LogLevel ALL
          The highest log level, no restrictions, everything will be logged.
static LogLevel ERROR
          This level identifies the attached object for errors purposes.
static LogLevel FATAL
          This level identifies the attached object for fatal errors purposes.
static LogLevel INFO
          This level identifies the attached object for informational purposes.
static LogLevel OFF
          The lowest log level, logging is turned off.
static LogLevel TRACE
          This level identifies the attached object for tracing purposes.
static LogLevel WARN
          This level identifies the attached object for warning purposes.
 
Constructor Summary
protected LogLevel(int logLevel)
          Creates a new LogLevel object with logLevel assigned to it.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares the log level with obj.
 int hashCode()
           
 boolean higher(LogLevel l)
          Compares for a higher log level than l.
 java.lang.String toString()
          Returns the log level in textual format, like "off", "trace", .
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ALL

public static final LogLevel ALL
The highest log level, no restrictions, everything will be logged.


ERROR

public static final LogLevel ERROR
This level identifies the attached object for errors purposes.


FATAL

public static final LogLevel FATAL
This level identifies the attached object for fatal errors purposes.


INFO

public static final LogLevel INFO
This level identifies the attached object for informational purposes.


OFF

public static final LogLevel OFF
The lowest log level, logging is turned off.


TRACE

public static final LogLevel TRACE
This level identifies the attached object for tracing purposes.


WARN

public static final LogLevel WARN
This level identifies the attached object for warning purposes.

Constructor Detail

LogLevel

protected LogLevel(int logLevel)
Creates a new LogLevel object with logLevel assigned to it.

Parameters:
logLevel - log level represented by this object
Method Detail

equals

public boolean equals(java.lang.Object obj)
Compares the log level with obj.

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
true if o is of type LogLevel and has the same log level as this object, false otherwise.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

higher

public final boolean higher(LogLevel l)
Compares for a higher log level than l.

Parameters:
l - level to compare
Returns:
true iff this object has a higher log level than l.

toString

public java.lang.String toString()
Returns the log level in textual format, like "off", "trace", . . .  or "unknown" if level is not defined.

Overrides:
toString in class java.lang.Object
Returns:
the log level as string