Документ взят из кэша поисковой машины. Адрес оригинального документа : 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
Кодировка:
: Interface Logger

ucar.util
Interface Logger

All Known Implementing Classes:
AbstractLogger, RMILogger

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

EMERG

public static final int EMERG
Log level for messages indicating that the system is unusable. Included only for syslog compatiblity.

ALERT

public static final int ALERT
Log level for messages indicating that action must be taken immediately. Included only for syslog compatiblity.

CRIT

public static final int CRIT
Log level for messages indicating critical conditions. Included only for syslogd compatiblity.

ERR

public static final int ERR
Log level for error messages. Included only for syslog compatiblity.

WARNING

public static final int WARNING
Log level for warnings.

NOTICE

public static final int NOTICE
Log level for messages indicating a normal but significant condition.

INFO

public static final int INFO
Log level for informational (verbose) messages.

DEBUG

public static final int DEBUG
Log level for debug messages
Method Detail

logUpTo

public void logUpTo(int maxLevel)
Control the verbosity of the implementation. Messages tagged with level above maxLevel may be discarded.

log

public void log(int level,
                java.lang.String message)
         throws java.io.IOException
Arrange to log the message at the given level.
Parameters:
level - Int value which is one of EMERG, ALERT, CRIT, ERR, WARNING, NOTICE, INFO, or DEBUG.
String - message to be logged.

logError

public void logError(java.lang.String message)
Shorthand for log(Logger.ERR, message).
See Also:
ERR, log(int, java.lang.String)

logNotice

public void logNotice(java.lang.String message)
Shorthand for log(Logger.NOTICE, message).
See Also:
NOTICE, log(int, java.lang.String)

logInfo

public void logInfo(java.lang.String message)
Shorthand for log(Logger.INFO, message).
See Also:
INFO, log(int, java.lang.String)

logDebug

public void logDebug(java.lang.String message)
Shorthand for log(Logger.DEBUG, message).
See Also:
DEBUG, log(int, java.lang.String)