NonStop Servlets for JavaServer Pages (NSJSP) 6.0 System Administrator's Guide

Logging in NSJSP 6.0
NonStop Servlets for JavaServer Pages (NSJSP) 6.0 System Administrator’s Guide544548-004
6-3
Logging Implementation in NSJSP 6.0
Logging Implementation in NSJSP 6.0
The logging package in NSJSP 6.0 is org.apache.juli. To overcome some of the
limitations of java.util.logging, NSJSP 6.0 replaces the default
java.util.logging implementation with a container-friendly implementation called
juli.
NSJSP 6.0 provides a LogManager org.apache.juli.ClassLoaderLogManager
that extends the java.util.logging.LogManager class.
The ClassLoaderLogManager configures logging, per class loader, unlike
java.util.logging.LogManager, where the logging configuration is for the entire
application. This unique feature of ClassLoaderLogManager can be used for a
separate logging configuration for each web application deployed in NSJSP 6.0.
The default configuration is loaded from the properties file indicated by the
java.util.logging.config.file system property .
The ClassLoaderLogManager searches for the logging.properties file in the
WEB-INF/classes directory of each web application deployed in NSJSP 6.0. If the
file is found in the WEB-INF/classes directory, the ClassLoaderLogManager
provides loggers based on the configuration, which are made available only to that web
application. If the file is not found in the WEB-INF/classes directory, the
ClassLoaderLogManager provides loggers based on the default configuration.
To allow better flexibility in assigning loggers, juli provides more configuration
extensions compared to the java.util.logging implementation. These extensions
are briefly described below:
1. Extensions to handle definitions
A prefix may be added to the handler names to instantiate multiple handlers of a
single class. A prefix is a string that starts with a digit and ends with a dot.
For example, 1catalina.org.apache.juli.FileHandler and
2catalina.org.apache.juli.FileHandler are treated as different handlers
though they are separate instances of the same class
org.apache.juli.FileHandler.
2. Dynamic configuration of property values in the logging.properties file
juli provides a feature whereby the property values in the
logging.properties file can be configured through system properties.
The property values in the logging.properties file with the format ${system
property name} will be replaced by the system property value during run time.
For example, if the logging.properties file cont
ains an entry like
1catalina.org.apache.juli.FileHandler.directory =
Note. In this chapter, the logging implementation in NSJSP 6.0 will hereafter be referred to as
juli.