Diag/browser-logs

From Scalix Wiki
Jump to: navigation, search

Introduction:

Browser logging records information about the activity of the SWA client. It also contains information that can be helpful in diagnosing any errors or problems. The logs can be kept on the client, the SWA server, or both, making sure the information is available.

Enabling:

For client logging to be used for a user, their e-mail address must be added to the swa.debug.listOfDebuggingUsers list in swa.properties. The swa.properties file is located at /var/opt/scalix/<instance>/webmail/swa.properties.

# Comma-separated list of Internet address of users with client logging enabled
swa.debug.listOfDebuggingUsers=user.test1@domain.com

If the remote logging feature will be used (that is, the client's logs will be forwarded to the server), then the REMOTE-CLIENT log must be enabled in the server's log4j.properties file as well. This file is located at ~scalix/<instance>/webmail/log4j.properties. *

Note: Versions of Scalix older than 11.0.4 had this file located at ~scalix/<instance>/tomcat/webapps/webmail/WEB-INF/classes/log4j.properties. If you've upgraded from a previous version, it is possible that this file will be missing from ~scalix/<instance>/webmail/log4j.properties. The server is compatible with both locations, but it is highly recommended to copy the file from ~scalix/<instance>/tomcat/webapps/webmail/WEB-INF/classes/log4j.properties to ~scalix/<instance>/webmail/log4j.properties before making changes to its contents. Using this location, changes to the file will not be lost in future upgrades.

The level for the REMOTE-CLIENT logger should be set to the INFO or DEBUG level. This sets the maximum log level which the server will accept from the client. The recommended setting is DEBUG, which means the server will accept all client messages up to and including the DEBUG level.

log4j.logger.REMOTE-CLIENT=DEBUG, remoteClient

These messages will be outputted to a log file which is located by default at ~scalix/<instance>/tomcat/logs/scalix-swa-remote-client.log.

The SWA server application must be reloaded to activate the changes to swa.properties or log4j.properties. This can be done by restarting Scalix Tomcat, or in some cases, by simply touching the SWA web application archive file at /opt/scalix/web/scalix-swa.war and waiting a few moments.

[root@test9]# touch /opt/scalix/web/scalix-swa.war

or

[root@test9]# /etc/init.d/scalix-tomcat restart

Using:

After SWA has reloaded, when the user for which debugging has been enabled logs into SWA there will be a new entry under the "Tools" menu titled "SWA Debugging." From the "Debug Options" sub-entry, the logging level (ERROR, WARN, INFO, and DEBUG) and destination (Local [client], Remote [server], and Both) can be controlled.

For any user for which debugging is enabled, the default log level setting is INFO, and this is the generally recommended setting. The default log destination is the local client.

Swa debug opts.jpg

When the log destination is set to "Local" or "Both," messages can be viewed by clicking the "Open SWA Console" item in the "SWA Debugging" menu. The buttons along the top of the console allow filtering the messages for a particular type, clearing the log, and, if the current destination is "Local," the ability to flush the current log contents to the remote server with changing the destination settings.

Swa log console.jpg