Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://angel.cs.msu.su/projects/system/toolsdoc/netcdf_java/ucar/util/Logger.html
Дата изменения: Tue Dec 28 20:59:06 2004 Дата индексирования: Sun Apr 10 00:13:06 2016 Кодировка: |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public static final int EMERG
public static final int ALERT
public static final int CRIT
public static final int ERR
public static final int WARNING
public static final int NOTICE
public static final int INFO
public static final int DEBUG
Method Detail |
public void logUpTo(int maxLevel)
maxLevel
may be discarded.public 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.public void logError(java.lang.String message)
log(Logger.ERR, message)
.ERR
,
log(int, java.lang.String)
public void logNotice(java.lang.String message)
log(Logger.NOTICE, message)
.NOTICE
,
log(int, java.lang.String)
public void logInfo(java.lang.String message)
log(Logger.INFO, message)
.INFO
,
log(int, java.lang.String)
public void logDebug(java.lang.String message)
log(Logger.DEBUG, message)
.DEBUG
,
log(int, java.lang.String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |