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 Guide—544548-004
6-7
LogFactory in NSJSP 6.0
The table below indicates the mappings between logging methods in the Log interface
and the logging levels mentioned in the logging properties file.
The following example describes how methods in the Log interface are mapped to the
logging levels in the logging.properties file. Assume the following:
A handler 1nsjsp.com.tandem.servlet.logging.NSJSPLogHandler is
defined.
The configuration of the log handler is:
1nsjsp.com.tandem.servlet.logging.NSJSPLogHandler.destination
=STDOUT
1nsjsp.com.tandem.servlet.logging.NSJSPLogHandler.level=INFO
A logger element is configured as:
com.tandem.servlet.handlers=1nsjsp.com.tandem.servlet.logging
.NSJSPLogHandler
Assuming the above logger configuration, logging for all classes under the package
com.tandem.servlet is handled by the handler
1nsjsp.com.tandem.servlet.logging.NSJSPLogHandler.
The messages with logging level equal to INFO or more than INFO are published.
Therefore, only messages with logging level INFO, WARNING and SEVERE are
published.
Further, assume that the following code is executed in the class
com.tandem.servlet.coyote.http11.NSJSPInternalInputBuffer.
protected static org.apache.juli.logging.Log log =
org.apache.juli.logging.LogFactory.getLog(NSJSPInternalInputBuffer.class
);
....
.....
....
log.debug("This is a debug message");
....
....
....
log.info("This is an info message");
After running the above code, only the info message is published, whereas the
debug message is not published. This is because the debug method maps the logging
level FINE, and the info method maps the logging level INFO. Only messages equal
to or severe than INFO are published, as configured in the log handler.
java.util.logging.Level Commons Logging Log Method
FINER trace
FINE debug
INFO info
WARNING warn
SEVERE error, fatal










