Logging

This document covers following topics:


General Information

Natural for Ajax uses the Java Logging API. In case of problems with Natural for Ajax , you can enable logging and thus write the logging information to an output file. This should only be done when requested by Software AG support.

You configure logging using the configuration tool .

Note:
Some logging information is also written to the console, regardless of the settings in the configuration file. The console shows the information which is normally provided by the logging levels SEVERE , WARNING and INFO .

Name and Location of the Configuration File

The name of the configuration file is natlogger.xml . The path to this file depends on the application server. Example for JBoss Application Server:

<application-server-install-dir> /server/default/deploy/njx <nn> ra.rar/log

Logging on JBoss Application Server

JBoss Application Server uses a different logging API (log4j). In this case, we recommend that you enable the file handler in the configuration file natlogger.xml .

Invoking the Logging Configuration Page

The content of the configuration file natlogger.xml is managed using the Logging Configuration page of the configuration tool .

Start of instruction setTo invoke the Logging Configuration page

  1. In the frame on the left, choose the Logging Configuration link.

    The Logging Configuration page appears in the right frame. Example:

    Logging configuration

  2. Specify the characteristics of the output file as described below in the section Overview of Options for the Output File .

  3. Specify the log levels for individual modules by selecting the log level from the corresponding drop-down list box.

    A brief description for each log level is provided on the Logging Configuration page.

  4. Choose the Save Configuration button to write the modifications to the configuration file.

    Caution:
    When you do not choose the Save Configuration button but log out instead or leave the configuration tool by entering another URL, your modifications are not written to the configuration file.

Overview of Options for the Output File

The following options are provided for specifying the characteristics of the output file:

Option Description
File pattern name The pattern for generating the output file name. Default: "%h/nwolog%g.log" .

The default value means that an output file with the name nwolog <number> .log will be created in the home directory of the user who has started the application server.

For detailed information on how to specify the pattern, see the Java API documentation .

File type The format of the output file. Select one of the following entries from the drop-down list box:
  • Text format
    Output in simple text format (default).

  • XML format
    Output in XML format.

The corresponding formatter class is then used.

File size The maximum number of bytes that is to be written to an output file. Zero (0) means that there is no limit. Default: "0" .
Number of files The number of output files to be used. This value must be at least "1" . Default: "10" .
File enabled If set to Yes (default), the file handler is enabled. If set to No , the file handler is disabled.
Append mode If set to Yes , the logging information is appended to the existing output file. If set to No (default), the logging information is written to a new output file.