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.


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.