Logs

The PureWeb server stores low-level logs for troubleshooting purposes.

You can access the files by logging into the server and clicking the Logs link, or by navigating to their location in the server's installed directory:
[install_path]\Server\tomcat\logs

The current logs have the extension .log and the archived logs have the extension .zip. To view a log, download it first by clicking its link. Logs are archived every day, and you can configure the log retention period.


Logs description

The table below provides a brief description of each type of log.

Log Description
pureweb.log

Contains all messages from the server about startup, shutdown, configuration details, and client activities. It also contains messages from the service application. For these, the PureWeb server uses the logging features available in the platforms used for service development. Anything a developer writes to the standard input/output is logged to pureweb.log.

Loggers are hierarchical in nature; pureweb.log is the parent that amalgamates the messages from all the other logs.

access.log

Provides server access information.

error.log

Provides a summary of any errors and warnings logged by the server.

activity.log

Provides a summary of application activity logged by the server and cooperating applications. This includes application startup, shutdown, and events deemed to be significant by the specific application.

catalina.log,
host-manager.log, manager.log
These are logs defined in the default tomcat configuration. They are not directly used by the PureWeb SDK.

In addition to these logs, you can also use the client API’s trace feature. The trace messages are displayed in the Trace tab of the client application’s Diagnostics Panel.


Loggers

The information in the log files comes from several loggers, summarized below.

These loggers can be configured in the logback.xml file, accessible from the PureWeb server's Configuration tab. See Log severity levels, further down this page.

  • pureweb.servlet.RequestLoggingFilter: Logs information about HTTP requests. For each request, the user, HTTP method, and URL are logged at the DEBUG log level.
  • pureweb.plugins.AuthenticationListener: Listens for authentication success events, logging information about each event at the INFO level.
  • pureweb: Loggers are hierarchical in nature, and pureweb is the parent. Changing the logging level for pureweb establishes a default level that can be overridden for more specific loggers.
  • pureweb.servlet.PluginServlet: Logs information at the INFO and DEBUG levels whenever a plug-in is loaded/unloaded or registered/unregistered.
  • pureweb.servlet.PluginDispatcherServlet: Does not produce any logging information directly. However, messages from this logger can appear in pureweb.log, most likely emanating from Spring (PluginDispatcherServlet is a derivative of the Spring class org.springframework.web.servlet.DispatcherServlet)
  • pureweb.process.ManagedService: Logs information about application life-cycle events at the INFO, WARN, and DEBUG levels.
  • pureweb.cluster.Cluster: Logs session usage statistics for a node in a cluster.

 


Log severity levels

Log severity levels allow developers and server administrators to adjust how much information is provided in the pureweb.log file.

The PureWeb server uses the logback logging framework to set the log severity levels (INFO, WARN, ERROR, DEBUG). For more information on this framework, including a description of each of the supported logging levels, refer to the logback API documentation.

The default logging level is DEBUG. To change this level:

  1. Log into the server and click on the Configuration link in the menu at the top to open the Configuration page.
  2. Scroll down the page until you see the Logging Configuration section.
  3. Click the logback.xml file link to display its content.
  4. Scroll down the file until you see the element whose logging level you want to change, for example RequestLoggingFilter:

    <logger name="pureweb.servlet.RequestLoggingFilter">
        <appender-ref ref="access"/>
    </logger>
    

  1. Add or edit the level parameter, for example:

    <logger name="pureweb.servlet.RequestLoggingFilter" level="INFO">		

  1. Click Save; you will be returned to the server’s Configuration page.

You must perform a reload or restart the server before server configuration or plug-in file changes take effect.

To perform a reload, navigate to the server's Configuration page and click the Reload button for the section where the file is located within the page (for example, if you edited a plug-in configuration file, click the Reload Plugins button, if you edited a logging configuration file, click the Reload Logging button, and so on).

If you edit a configuration file, the server will display a reload required message beside this file in the Configuration page as a reminder until the changes have been applied.


Log retention period

The default retention policy is to keep the most recent 14 days of log files. Production installations that require different retention policies can change this configuration to suit their requirements.

  1. Log into the server and click on the Configuration link in the menu at the top to open the Configuration page.
  2. Scroll down the page until you see the Logging Configuration section.
  3. Click the logback.properties file link to display its content.
  4. Enter the number of retention days for each log file.
  5. Click Save; you will be returned to the server’s Configuration page.

You must perform a reload or restart the server before server configuration or plug-in file changes take effect.

To perform a reload, navigate to the server's Configuration page and click the Reload button for the section where the file is located within the page (for example, if you edited a plug-in configuration file, click the Reload Plugins button, if you edited a logging configuration file, click the Reload Logging button, and so on).

If you edit a configuration file, the server will display a reload required message beside this file in the Configuration page as a reminder until the changes have been applied.


Monitoring the application log

Use a server monitoring tool such as Nagios (www.nagios.org) to monitor the pureweb.log for glewInit() errors using the grep command.

The path to the log is as follows:
[Installed_directory]\Server\tomcat\logs\pureweb.log

If the grep command returns a result for glewInit(), see example below, the monitoring tool can send an alarm stating that a GPU may be non-functional.

2011-05-26 07:49:06,668 DEBUG Application terminate called after throwing an instance of 'glewException'
2011-05-26 07:49:06,669 DEBUG Application what(): glewInit failed, this is unrecoverable
2011-05-26 07:49:06,669 DEBUG ProcessMonitor exit with status
134