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.
For information about the various logging and tracing options in AWI, as well as steps for collecting log data when reporting an error to CA Automic Support, see Preparing Log Files for Error Reporting.
The following list describes the setting values for the message level, listed in the order of the severity of the triggering situation:
-
ERROR
Purpose: Failure of some action of an AWI component that AWI was not able to recover from.
Tracing data in message: No user-identifying data, except the 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
Purpose: 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.
Tracing data in message: Same as ERROR level, also no user-identifying data.
-
INFO
Purpose: Configuration values at login or component startup, or global configuration changes.
Tracing data in message: Same as ERROR level but without the full stack trace. Also no user-identifying data.
-
DEBUG
Purpose: 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
Tracing data in message: Event-related specifications and possibly user information. Default value in the logback.xml.
-
TRACE
Purpose: 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. It contains user-identifying data.
Tracing data in message: Same as DEBUG.
File location
When you have installed the AWI, you find this configuration file in your application server, in the ...\<AWI>\config folder.
To Change the Default Setting for the Severity Level
- In your application server go to ...\<AWI>\config.
- Open the logfile.xml file to edit it.
- Change the log level for the root appender.
- Search for 'ref="LOGGER" .'
- 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. For more information, see Log levels.
Do not change any other parameters in the file because this might make it impossible for CA Automic to investigate error situations.
- For the changes to take effect, stop and restart your application server.
Structure
The list below 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.
-
<root level="log_level">
The start of the root element and the specification of the "level" attribute, where you define the log level. For more information, see Log levels.
-
<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>