NonStop Servlets for JavaServer Pages (NSJSP) 7.0 System Administrator's Guide
Logging in NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) 7.0 System Administrator’s Guide—674372-005
5-28
Programming Considerations for Logging
For information on log file configuration, see Configuring the logging.properties File on
page 5-20.
The name of the log file is derived from the Servlet Server Class name. For example, if
the name of the Servlet Server Class is ABC, the name of the log file is <Server
Class Name>.<date>.log
where,
<Server Class Name> - is the name of the Servlet Server Class.
<date> - is the date when NSJSP starts. The date is in yyyy-mm-dd format, and is
automatically added.
This log file supports log rollover. By default, date-based rollover is enabled. However,
unlike the out and err files, you can modify the settings of this log file.
Programming Considerations for Logging
To use JULI logging framework, you must be aware of the following classes:
LogFactory
Log
LogFactory
The LogFactory class is used to identify an underlying logging implementation. It
provides an entry point for the applications to obtain the appropriate implementation of
the Log interface. The LogFactory implementation in JULI is similar to the
LogFactory implementation in Commons Logging, except that the LogFactory has
a hard-coded implementation for java.util.logging.
For information on the LogFactory implementation in Commons Logging, see
http://commons.apache.org/logging/
.
The following is an example of the getLog method of the LogFactory class
(org.apache.juli.logging.Log) to obtain the most suitable implementation of
the Log interface (org.apache.juli.logging.Log) for the
NSJSPInputBuffer.class:
protected static org.apache.juli.logging.Log log =
org.apache.juli.logging.LogFactory.getLog(NSJSPInternalInputBuff
er.class);
Log
In JULI, the implementation of the Log interface is for the underlying logging
implementation of java.util.logging. JULI implements the Log interface of
Commons logging for the java.util.logging logging framework.










