log.handler.name.url
Grace Software
JavaLog

$Revision: 1.2 $
$Date: 1999/10/28 11:17:25 $





Name: log.handler.name.url
Description: This controls which and what type of handlers are used during the logging process.  When no are handlers specified, the logging system writes to the stardard output.  If any handlers are specified using this property pattern, then a handler, capable of handling the url type, is installed under the given name.  The named handler then loads other properties using the name. Currently, there are two main handlers: grace.log.FileHandler and grace.log.JDBCHandler.  Note that the grace.log.FileHandler can be given the property log.handler.name.maxsize="1M" in order to limit the size of the file.

Capable Handlers can also be accessed remotely.  That means, Handlers that are being used in one JVM can be accessed from another JVM.  This works because the Handlers are RemoteObjects and so they can register themselves in a local RMI Registry such that other remote JVMs can look them up and use them as if they were local.  In order to access a remote handler, that handler must be registered in the RMI registry by specifying -Dlog.handler.name.server=true on the command line of the java program whose Handler will be accessed remotely by others.

Type: URL
Acceptable Values:
file://absolute-path-and-filename This installs a FileHandler that opens, creates, and writes to the given absolute-path-and-filename.
file:relative-path-and-filename This installs a FileHandler that opens, creates, and writes to the given :relative-path-and-filename.  The path is relative to the point at which the java program was started.
file:- This installs a FileHandler that writes to the standard output.
jdbc:sub-protocol:db-name This installs a JDBCHandler that writes to the database specified by the URL. 
rmi://host/log.handler.remote-handler-name This looks up the named remote-handler-name in the RMI registry of host and installs the remote Handler under the name used for the local property.
Default Value: none
Example Usage:
$ java -Dlog.handler.out.url=file:- grace.log.Log Logs to the standard output. 
$ java -Dlog.handler.out.url=file:../test.loggrace.log.Log Logs to the file in the parent directory called test.log
$ java -Dlog.handler.out.url=file:/var/adm/java.loggrace.log.Log Logs to /var/adm/java.log
$ java -Dlog.handler.out.url=jdbc:idb:log.prpgrace.log.Log Logs to the Instant DB JDBC database
$ java -Dlog.handler.out.url=rmi://tiger/log.handler.outgrace.log.Log Logs to the remote handler that is running on host tiger and registered in the RMI registry uder the name log.handler.out.  This assumes that the remote program was started with -Dlog.handler.out.server=true.