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-6
LogFactory in NSJSP 6.0
instance of the NSJSPFormatter, it passes the value of the format attribute to the
NSJSPFormatter. This way the format in which messages are published can be
configured.
NSJSPFormatter formats a message in the default format when it is used with any
other handler.
The NSJSPFormatter class is
com.tandem.servlet.logging.NSJSPFormatter, which extends the
java.util.logging.Formatter class.
By default, NSJSPLogHandler uses the
com.tandem.servlet.logging.NSJSPFormatter class.
The default message format is:
{DATE,date,EEE, MMM dd, HH:mm:ss}; {PROCESSNAME}; {LEVEL};
{SOURCE}; {MESSAGE}
The following example describes how NSJSPFormatter can be configured with other
handlers.
Example:
java.util.logging.ConsoleHandler.formatter =
com.tandem.servlet.logging.NSJSPFormatter
After the configuration, the ConsoleHandler will use the NSJSPFormatter.
LogFactory in NSJSP 6.0
LogFactory in the NSJSP 6.0 logging implementation is similar to the LogFactory
function in Commons Logging, except that it has a hard-coded implementation for
java.util.logging.
LogFactory provides an entry point for applications to obtain the appropriate
implementation of the Log interface. For example:
protected static org.apache.juli.logging.Log log =
org.apache.juli.logging.LogFactory.getLog(NSJSPInternalInputBuff
er.class
);
Note. If Log4J implementation is required, create a new logging package that includes the
LogFactory class with a hard-coded implementation for Log4J.