Introduction
Grace Software
JavaLog

$Revision: 1.4 $
$Date: 1999/10/28 12:14:51 $




Introduction

The JavaLog is a set of Java classes that formats and writes events to one or more log devices.  JavaLog frees the programmer from coding inflexible "print" statements in his code.  It offers an abstract interface to the various log devices and allows the user to configure each log device at run time.  Additionally, JavaLog allows the user to dynamically filter and format the logged events to suit his particular needs at run time.

For example, if the programmer logs events to JavaLog, the user may, at run time, decided that he wants to see error events in a pop-up dialog box, warning events written to a file, and informational events on the standard output.  Additionally, for each type of event (errors, warnings, notices, traces, or user defined) he may specify a format in which each event should be logged.

The programmer's job is simple:

import grace.log.Log;
...
public void foobar() {
    Log.trace("hey!");
}
The resulting program will then produce the following:
03/07/99 17:02:48: 13: trace: system.main.Thread1: Test.foobar:54: "hey!"
Yes, it's just that simple!  Notice that in the preceding call to Log.trace(data),  JavaLog printed out the String "MyData" and automatically determined and logged the following: Now, go back to the quick index for more information.