Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## drm.server
Class ConsoleLogger

    java.lang.Object
      |
      +--drm.server.ConsoleLogger

All Implemented Interfaces:
  ILogListener

public class ConsoleLogger
extends java.lang.Object
implements ILogListener

Loggs messages to the console. Debugging goes to the standard output, warnings and errors to the standard error. Every message is prefixed by a timestamp. The amount of information emitted is determined by the verbosity level (`verbosity`). The behaviour of the logger as a function of this value is as follows.

- 0: nothing is printed
- 1: only panic messages are printed (stderr)
- 2: error messages are also printed (stderr)
- 3: warning messages are also printed (stderr)
- 4: debug messages are also printed (stdout).
- 10 and above: the stack trace of exceptions is also printed if available (stderr).

Field Summary
`int` | `verbosity`

Fields inherited from interface drm.agentbase.ILogListener
`DEBUG, ERROR, INFO, PANIC, WARNING`

Constructor Summary
`ConsoleLogger()`

Method Summary
`void` | `handleLogMessage(int type, java.lang.String sender, java.lang.String comment, java.lang.Throwable thr)` Reaction when diagnostic information is emitted by an entity (the base or an agent).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### verbosity

    public int verbosity

Constructor Detail

### ConsoleLogger

    public ConsoleLogger()

Method Detail

### handleLogMessage

    public void handleLogMessage(int type,
                                 java.lang.String sender,
                                 java.lang.String comment,
                                 java.lang.Throwable thr)

  Description copied from interface: `ILogListener`
  Reaction when diagnostic information is emitted by an entity (the base or an agent).
  Specified by:
    `handleLogMessage` in interface `ILogListener`
  Following copied from interface: `drm.agentbase.ILogListener`
  Parameters:
    `type` - The type of the information. The constants defined in this interface are used by the base.
    `sender` - Identifies the sender, e.g. the name of the function that sends the message. Must not be null.
    `comment` - An optional explanatory message. Might be null.
    `thr` - An optional Throwable object that caused this event. Might be null.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD