NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator's Guide
Logging in NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator’s Guide—596210-006
5-29
Log
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.
The following is an example of the Log interface implementation for the
MyTestClass.class from the logging configuration file, logging.properties:
Log logger = LogFactory.getLog(MyTestClass.class)
The Log interface of Commons Logging defines methods such as error, fatal,
trace, and so on. The underlying logging implementation, java.util.logging,
defines its own logging levels.
Table 5-9 shows the mapping between Commons Logging methods and
java.util.logging levels.
In the following sample of code, the import statements are used to import the
LogFactory and the Log classes of the Commons Logging. The LogFactory class
creates the logger, which in turn used to log messages based on the log levels such as
info, warning, and so on.
....
....
import org.apache.juli.logging.LogFactory;
import org.apache.juli.logging.Log;
....
Table 5-9. Mapping of Logging Methods
java.util.logging.level Commons Logging Log Method
SEVERE
error, fatal
WARNING warn
INFO info
FINE debug
FINER trace
Note. The priority of log level defined in Table 5-9
is in the descending order. The log level
SEVERE has the highest priority and log level FINER has the lowest priority.
The java.util.logging levels are defined in the logging.properties configuration file.
The Commons Logging methods are used in the user application.










