|
Grace Software
JavaLog
$Revision: 1.1 $
$Date: 1999/10/11 00:05:13 $
|
Introduction
Handlers are classes that
perform some final output action on log events. The Log class distributes its events to
each Handler that is installed at runtime (via properties usually).
One can think of Handlers as a kind of device driver adapter for the
Log. So, at run time, one can configure the program to write all
events to the standard out, errors to one file, traces to another
file, and errors and warnings to JDBC database.
By default, JavaLog only logs to the standard out using the StandardOutHandler called
out. If the user specifies any alternative handler at runtime,
the StandardOutHandler out is not installed and, thus, log
events are logged only to the Handlers explicitly configured by the
run time user. For more information, see How To log to the standard out.
Handler Names
Each Handler must have a unique name so that multiple properties may
be specified for each Handler. As written above, the default
StandardOutHandler is named out. Therefore, to configure any
property for this Handler, one would refer to the Handler by the
prefix log.handler.out. and then append the desired property
name to it. For example,
$ java -Dlog.handler.out.stream=err MyClass
would write the log events to the System.err instead of System.out.
Other than out, Handler names are purely the user's design.