## 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, String message)` Arrange to log the `message` at the given `level`.
`void` `logDebug(String message)` Shorthand for `log(Logger.DEBUG, message)`.
`void` `logError(String message)` Shorthand for `log(Logger.ERR, message)`.
`void` `logInfo(String message)` Shorthand for `log(Logger.INFO, message)`.
`void` `logNotice(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.

  See Also:
    Constant Field Values

### ALERT

    public static final int ALERT

  Log level for messages indicating that action must be taken immediately. Included only for syslog compatiblity.

  See Also:
    Constant Field Values

### CRIT

    public static final int CRIT

  Log level for messages indicating critical conditions. Included only for syslogd compatiblity.

  See Also:
    Constant Field Values

### ERR

    public static final int ERR

  Log level for error messages. Included only for syslog compatiblity.

  See Also:
    Constant Field Values

### WARNING

    public static final int WARNING

  Log level for warnings.

  See Also:
    Constant Field Values

### NOTICE

    public static final int NOTICE

  Log level for messages indicating a normal but significant condition.

  See Also:
    Constant Field Values

### INFO

    public static final int INFO

  Log level for informational (verbose) messages.

  See Also:
    Constant Field Values

### DEBUG

    public static final int DEBUG

  Log level for debug messages

  See Also:
    Constant Field Values

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,
                    String message)
             throws 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`.
  Throws:
    `IOException`

### logError

    public void logError(String message)

  Shorthand for `log(Logger.ERR, message)`.

  See Also:
    `ERR`, `log(int, java.lang.String)`

### logNotice

    public void logNotice(String message)

  Shorthand for `log(Logger.NOTICE, message)`.

  See Also:
    `NOTICE`, `log(int, java.lang.String)`

### logInfo

    public void logInfo(String message)

  Shorthand for `log(Logger.INFO, message)`.

  See Also:
    `INFO`, `log(int, java.lang.String)`

### logDebug

    public void logDebug(String message)

  Shorthand for `log(Logger.DEBUG, message)`.

  See Also:
    `DEBUG`, `log(int, java.lang.String)`