The Active Web servlet supports the same log files as the Concerto application server, via an access log and an error log. Given it is executing in a servlet Container the other log files are not present as this functionality is provided as part of your chosen container so refer to its documentation on how it should be configured.

The Active Web servlet can be configured with up to two log files, an access log indicating which pages are processed and how long they have taken and an error log that it used to report errors that may occur during page processing.

Access Log

The access log is configured with the Active Web servlet parameter access_log.  This defines the full path name of the file where the access records are written.  During the initialisation phase of the Active Web servlet , the servlet will attempt to create the access log; if it fails then the servlet will log a message to the servlet Containers log. 

Logging of page accesses is not performed each time a page is processed, to save processing time the log is only updated by default every 120 seconds.  Should you wish to shorten this duration then you will need to set the Active Web servlet parameter access_log_flush_time by specifying a duration in seconds between 1 and 3600 (1hour).

If you do not have the access log configured then the access log charting and reporting pages will not work in the servlet administration.

Error Log

The error log is configured with the Active Web servlet parameter error_log. It defines the fully qualified path to the file that is to receive the error messages that may be generated during the operation of the Active Web servlet. Unlike the access log the error log is not flushed periodically but every time an error occurs.

Should the error log not be configured as a parameter to the servlet then all error messages will be routed to the log supplied by the Servlet container. This allows the administrator to still maintain a record of all servlet error messages.

When the error_log is not specified the administration pages that allow display of the log will not show any information and will report that the error log cannot be read.

Log File Naming Conventions

In addition to specifying a fully qualified path on the file system, it is also possible to specify a path relative to either the System tmp environment variable or the temporary directory provided to the servlet. 

For example:

tmp=/var/tmp
$tmp/Concerto/logs/access_log.txt

the path to the log file would resolve to /var/tmp/Concerto/logs/access_log.txt

To use the temporary directory supplied to the Servlet via its container you should use the $ctxtmp symbol at the start of the path:

$ctxtmp/Concerto/logs/access_log.txt

the path to the log file may resolve to:

c:\tomcat\work\tmp\ROOT

The path following $tmp or $ctxtmp should be in a format native to the platform on which the servlet is executing. When checking for the reserved tokens $tmp and $ctxtmp, the Active Web servlet will look for $ctxtmp first.

Comment on this topic

Topic ID: 150022