|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fhg.igd.logging.LogLevel
This is the main log level class which provides a set of predefined known instances. Those serve as some sort of template from which all specific log level objects in the underlying mechanisms will be created automatically.
Priorities of predefined log levels are as follows (in descending order):
Field Summary | |
static LogLevel |
ALL
This log level is intended to be used for showing the complete logging output since it has the lowest possible priority |
static LogLevel |
DEBUG
This log level is intended to be used for debugging purposes, its priority is lower than those of all log levels except TRACE and
ALL |
static LogLevel |
ERROR
This log level is intended to be used for error events that definitely will not lead into general malfunction, its priority is lower than those of SEVERE ,
FATAL and
OFF |
static LogLevel |
FATAL
This log level is intended to be used for error events that definitely will lead into general malfunction, its priority is only lower than those of OFF |
static LogLevel |
INFO
This log level is intended to be used for information purposes, its priority is lower than those of all log levels except DEBUG ,
TRACE and
ALL |
private static Set |
known_
The storage for all known log levels |
protected String |
name_
The log level name |
protected static LogLevel |
NOTIFICATION_
A hidden log level used for notification about internal events, its priority is right below OFF |
static LogLevel |
OFF
This log level will turn off all logging output since it has the highest possible priority |
protected int |
priority_
The log level priority |
static LogLevel |
SEVERE
This log level is intended to be used for error events that might lead into general malfunction, its priority is lower than those of FATAL and
OFF |
static LogLevel |
TRACE
This log level is intended to be used for detailed debugging traces, its priority is lower than those of all other log levels except ALL |
static LogLevel |
WARNING
This log level is intended to be used for warning (not yet error) purposes, its priority is lower than those of all log levels except INFO ,
DEBUG ,
TRACE and
ALL |
Constructor Summary | |
protected |
LogLevel(String name,
int priority)
Create a LogLevel . |
Method Summary | |
boolean |
equals(Object obj)
|
static LogLevel |
forNotification()
Get the LogLevel that is supposed to be used for system
internal notifications only. |
static Set |
getAll()
Get all known LogLevel references. |
String |
getName()
|
int |
getPriority()
|
int |
hashCode()
|
boolean |
isEqualTo(LogLevel level)
Check if this LogLevel is equal to the given one. |
boolean |
isGreaterOrEqualTo(LogLevel level)
Check if this LogLevel is greater or equal to the
given one. |
boolean |
isGreaterThan(LogLevel level)
Check if this LogLevel is greater then the given one. |
boolean |
isLessOrEqualTo(LogLevel level)
Check if this LogLevel is less or equal to the given one. |
boolean |
isLessThan(LogLevel level)
Check if this LogLevel is less then the given one. |
private Object |
readResolve()
Serialization magic to avoid "doppelgangers" and also for performance optimization. |
static LogLevel |
toLevel(String name)
Get a log level by name or priority. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static Set known_
public static final LogLevel ALL
public static final LogLevel TRACE
ALL
public static final LogLevel DEBUG
TRACE
and
ALL
public static final LogLevel INFO
DEBUG
,
TRACE
and
ALL
public static final LogLevel WARNING
INFO
,
DEBUG
,
TRACE
and
ALL
public static final LogLevel ERROR
SEVERE
,
FATAL
and
OFF
public static final LogLevel SEVERE
FATAL
and
OFF
public static final LogLevel FATAL
OFF
public static final LogLevel OFF
protected static final LogLevel NOTIFICATION_
OFF
protected String name_
protected int priority_
Constructor Detail |
protected LogLevel(String name, int priority)
LogLevel
. The newly created instance will be
added to the set of known log levels automatically (if not yet present).
name
- The log level namepriority
- The log level priorityMethod Detail |
public String getName()
public int getPriority()
public static Set getAll()
LogLevel
references.
public boolean isGreaterThan(LogLevel level)
LogLevel
is greater then the given one.
level
- The LogLevel
to be checked
true
if this LogLevel
is greater
than the given one
NullPointerException
- if the given object is null
public boolean isGreaterOrEqualTo(LogLevel level)
LogLevel
is greater or equal to the
given one.
level
- The LogLevel
to be checked
true
if this LogLevel
is greater
or equal to the given one
NullPointerException
- if the given object is null
public boolean isEqualTo(LogLevel level)
LogLevel
is equal to the given one.
Notice: In contrary to equals(java.lang.Object)
, this method checks
for equal priorities only.
level
- The LogLevel
to be checked
true
if this LogLevel
is equal
to the given one
NullPointerException
- if the given object is null
public boolean isLessOrEqualTo(LogLevel level)
LogLevel
is less or equal to the given one.
level
- The LogLevel
to be checked
true
if this LogLevel
is greater
than the given one
NullPointerException
- if the given object is null
public boolean isLessThan(LogLevel level)
LogLevel
is less then the given one.
level
- The LogLevel
to be checked
true
if this LogLevel
is greater
than the given one
NullPointerException
- if the given object is null
public static LogLevel toLevel(String name)
name
- The name or priority of the requested log level
null
if the given
parameter could neither identified as name nor as priority of a
known log levelpublic static LogLevel forNotification()
LogLevel
that is supposed to be used for system
internal notifications only. It is currently used by the
Asynchronous Message Dispatching mechanism to notify users
about discarded messages.
AbstractAsynchronousMessageDispatcher
public boolean equals(Object obj)
public int hashCode()
public String toString()
private Object readResolve() throws InvalidObjectException
InvalidObjectException
- if the deserialized LogLevel
does not exist
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |