For diagnostic purposes, WebAdmin allows trace information on the program run to be recorded in files. WebAdmin uses the Java Logging Framework Log4j2 for the logging functions.
The configuration settings of the Log4j2 framework are stored in the file WebAdmin.log4j2.properties.xml
which is located in the UtmWebAdmin/app/config
subdirectory of the WebAdmin installation directory.
WebAdmin uses a mechanism that generates multiple logging files for storing the trace records. The main logging file, the number of backup files and the maximum size of a logging file are specified.
Mode of operation:
The mechanism generates and requires the management file <File>.gen
, i.e. the file path will usually be UtmWebAdmin/app/logs/logging.txt.gen
.
It always writes to the logging file <File>
. On switching the file <File>
is copied into a backup file called <FilePrefix>.<NextFileGeneration>.<FileSuffix>
, and the file <File>
is now written from the beginning again. If there is subsequently more backup files than specified in <MaxNbrBackupFiles>
, and if <MaxNbrBackupFiles>
is greater than 0, then the oldest backup files are deleted on switchover.
Example for <MaxNbrBackupFiles>=3
Situation before switching:
logging.txt | (in use) |
logging.13.txt | (oldest backup file) |
logging.14.txt | |
logging.15.txt | (newest backup file) |
On changeover, logging.txt
is copied to logging.16.txt
, logging.13.txt
is deleted and logging.txt
is written again.
Situation after switching:
logging.txt | (in use) |
logging.14.txt | (oldest backup file) |
logging.15.txt | |
logging.16.txt | (newest backup file, previously logging.txt ) |
In this case, the <FilePrefix>
is "logging
" and the <FileSuffix>
is "txt
". A file suffix always consists of three characters and is separated from the file prefix by a dot.
WebAdmin is supplied with three different logging configurations. These are in the directory <WebAdmin-InstallationDirectory>/UtmWebAdmin/app/config
and are named WebAdmin.log4j2.properties_default.xml
, WebAdmin.log4j2.properties_error.xml
and WebAdmin.log4j2.properties_debug.xml
. The configuration being used is in the file WebAdmin.log4j2.properties.xml
. To use a different logging configuration, simply delete the file WebAdmin.log4j2.properties.xml
, copy the desired configuration file and rename it WebAdmin.log4j2.properties.xml
. Only do this when the web server is not running.
The individual configuration files in detail:
WebAdmin.log4j2.properties_default.xml
Following installation, the contents of this file is the same as that of the filelog4j.properties.xml
. This logging configuration records the least trace information.
WebAdmin.log4j2.properties_errort.xml
This logging configuration records a medium amount of trace information and can be activated to diagnose errors in the web application.
WebAdmin.log4j2.properties_debug.xml
This logging configuration records a large amount of trace information. Among other things, it activates the logging of all UPIC traces which are received from the UTM applications. It should only be activated in certain situations for error diagnostics.
Please note: WebAdmin as a Windows service writes logging into directory apache-tomcat\logs