logback.xml

This topic briefly explains how logging is handled in AWI, and describes how to change the default setting for the severity level of AWI event messages that are logged.

Configuration required?

No. Default values are provided in the delivered version.

Related AWI Products

The AWI framework and all its perspectives.

Description

Logging of AWI event messages is handled by the logback framework for Tomcat. This logging covers everything that happens in AWI except for the communication with the AE API . The specifications for AWI logging are defined in the logback.xml. Here you can configure the lowest severity level of messages that you want to have tracked. You can change this value, but should not change anything else in the file.

The severity level in the delivered logback.xml is set to DEBUG. For a normal, functioning production environment, you should change this to INFO, so that performance isn't sluggish due to excessive logging.

Logging for error reporting

For information about the various logging and tracing options in AWI, as well as steps for collecting log data when reporting an error to Automic support, see "Preparing Log Files for Error Reporting."

Log levels

The following table lists the setting values for the message level, listed in the order of the severity of the triggering situation.

Log Level

Purpose

Tracing Data in Message
ERROR

Failure of some action of an AWI component that AWI was not able to recover from.

No user-identifying data, except the Automic username. However, hostnames, other site-specific data, class names, object names, and the like are included with the event related specifications. The message contains the full stack trace.
WARNING

Unexpected behavior of an AWI component, such as unstable network connections that require auto-reconnect from AWI, a post-timeout retry, or triggering of a workaround for a third-party bug .

Same as ERROR level

INFO

Configuration values at login or component startup, or global configuration changes.

Same as ERROR level but without the full stack trace.

DEBUG

High-level user-specific actions such as login/logout events, user changes (such as object edits), authorization related events (such as successful/failed setup actions), and important performance measures

Event-related specifications and possibly user information.

Default value in the Automic logback.xml.

TRACE

Low-level user-specific actions such as navigation, object open, button clicks, the payload of backend-calls, internal application events, and all calls to the backend.

Same as DEBUG.

File location

When you have installed the AWI, you find this configuration file in your Tomcat web application server, in the folder ...\webapps\<AWI>\config.

Steps

  1. In your Tomcat web server go to the folder ...\webapps\<AWI>\config.
  2. Open the logfile.xml file to edit it.
  3. Change the log level for the root appender.
    1. Search for 'ref="LOGGER" .'
    2. One line above that, change the value of the <root level= "value"> parameter to the lowest severity level of the log messages that you want tracked for AWI. Refer to the "Log levels" table above.

    Do not change any other parameters in the file because this might make it impossible for Automic to investigate error situations.

  4. For the changes to take effect, stop and restart your Tomcat web server.

Structure

The table that follows explains the root element where you set the log level for the LOGGER appender in the logback.xml. The rest of the file is not described, because you should not touch it.

Element Description
<root level="log_level">

The start of the root element and the specification of the "level" attribute, where you define the log level.

For a description of the valid values, see the "Log levels" table above.

<appender-ref ref="LOGGER" /> Identifies that this is the <root> element for the LOGGER appender. The LOGGER appender is the component that writes the logging events for AWI actions and events.
</root> End of the root element.

Example

The following code is the section of the logback.xml where you set the root log level for logging in AWI. Here it is set to "INFO", which is the default value and appropriate for a production environment. You can change this, for example to "DEBUG" when you need more verbose log files with more details for error analysis.

<!-- Log level is set here. Possible values: TRACE, DEBUG, INFO, WARN, ERROR

          DEBUG is recommended on testing and development instances.

          INFO is recommended on production instances.

-->

To avoid too many log entries.

          <appender-ref ref="LOGGER" />

</root>