|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.wraplog.Level
Declaration of different logging levels.
Updated to WrapLog version 1.1.
Field Summary | |
static int |
DEBUG
Logging level for messages that usually are of no interest for the user. |
static int |
ERROR
Logging level for messages that explain why the desired operation cannot be performed. |
static int |
INFO
Logging level for messages that tell details about normal operations currently going on. |
static int |
WARN
Logging level for message that notify that the things can be processed, but the user might want to take a closer look at the current situation. |
Constructor Summary | |
Level()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEBUG
public static final int ERROR
Note: a simple way for deriving goog error messages is to make them fit the pattern:
cannot do something: actual state must match expectation.Just fill in "do something", "actual state" and "expectation".
In case your code is just reporting a Java
Exception
that happens at a lower level on the call stack,
use the pattern:
cannot do something: <
exception.getMessage()
>.
In practice,
this often results into sucky error messages, but therer is not much you
can do about it except making sure that if your own
Exceptions
have a useful getMessage()
.
public static final int INFO
public static final int WARN
Note: warnings are a good indicator for bad design. They hint at the
developer being to dumb to resolve a situation and therefor delegating
the responsibility to the user. Preferrably, the code shoud be changed to
either log INFO
, throw an exception or log
ERROR
.
Constructor Detail |
public Level()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |