|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Logger
This interface provides logging functions for daemon applications
such as servers. It looks a lot like UCAR's ulog(3)
C language interface, which in turn looks like the UNIX
syslog(3C)
client interface.
Log messages are tagged with a numeric logging level, selected from the ordered list of constants below. Higher levels are more verbose. An implementation would use the level of a message to decide where and whether to write the message.
The three lowest logging levels,
EMERG
,
ALERT
, and
CRIT
,
should probably never be
assigned by user (non-kernel or non JVM?) code.
Note: By default, the shorthand methods are silent in the face of internal exceptions.
Field Summary | |
---|---|
static int |
ALERT
Log level for messages indicating that action must be taken immediately. |
static int |
CRIT
Log level for messages indicating critical conditions. |
static int |
DEBUG
Log level for debug messages |
static int |
EMERG
Log level for messages indicating that the system is unusable. |
static int |
ERR
Log level for error messages. |
static int |
INFO
Log level for informational (verbose) messages. |
static int |
NOTICE
Log level for messages indicating a normal but significant condition. |
static int |
WARNING
Log level for warnings. |
Method Summary | |
---|---|
void |
log(int level,
java.lang.String message)
Arrange to log the message
at the given level . |
void |
logDebug(java.lang.String message)
Shorthand for log(Logger.DEBUG, message) . |
void |
logError(java.lang.String message)
Shorthand for log(Logger.ERR, message) . |
void |
logInfo(java.lang.String message)
Shorthand for log(Logger.INFO, message) . |
void |
logNotice(java.lang.String message)
Shorthand for log(Logger.NOTICE, message) . |
void |
logUpTo(int maxLevel)
Control the verbosity of the implementation. |
Field Detail |
---|
static final int EMERG
static final int ALERT
static final int CRIT
static final int ERR
static final int WARNING
static final int NOTICE
static final int INFO
static final int DEBUG
Method Detail |
---|
void logUpTo(int maxLevel)
maxLevel
may be discarded.
void log(int level, java.lang.String message) throws java.io.IOException
message
at the given level
.
level
- Int value which is one of
EMERG
,
ALERT
,
CRIT
,
ERR
,
WARNING
,
NOTICE
,
INFO
, or
DEBUG
.String
- message to be logged.
java.io.IOException
void logError(java.lang.String message)
log(Logger.ERR, message)
.
ERR
,
log(int, java.lang.String)
void logNotice(java.lang.String message)
log(Logger.NOTICE, message)
.
NOTICE
,
log(int, java.lang.String)
void logInfo(java.lang.String message)
log(Logger.INFO, message)
.
INFO
,
log(int, java.lang.String)
void logDebug(java.lang.String message)
log(Logger.DEBUG, message)
.
DEBUG
,
log(int, java.lang.String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |