Log files
Introduction to log files in ConSol CM
Log files are the main source of information about the activities in the system and potential problems. They are used to save log messages from the different components of ConSol CM.
Concepts, terms and definitions
Concept |
Other terms |
Definition |
---|---|---|
log file |
|
Text file with the extension .log used to write messages about the activities in the system and errors |
log level |
|
The log level determines which messages are written in the log files and how many details are included in the log messages. The most used log levels are ERROR, INFO and DEBUG. |
Purpose and usage
Log files contain information about the system activity. If an error occurs during system operation, they contain details about the error. Analyzing log files is useful for troubleshooting of errors and to reveal problems which do not appear on the user interface.
There are two ways of accessing the log files:
- Open the file on the file system. The default path is <JBOSS_HOME>/standalone/log.
- Open the Log files page of the Web Admin Suite, where you can view and download the log files.
Available log files
The following log files are available in ConSol CM:
- access.log
Contains log messages about the access to and usage of the Web Client. Needs to be enabled explicitly, see Activating the access.log file. - audit.log
Contains log messages about login / logout operations in the Web Admin Suite, and all operations which are performed using these applications, e.g. configuration changes and workflow deployments. In addition, all changes to the page customization are logged. - cmrf.log
Contains log messages from the CMRF (ConSol CM Reporting Framework), i.e., messages regarding the data transfer operations from the ConSol CM database to the CMRF database (DWH). - cmweb.log
Contains log messages from the Web Client. - ctx.log
Contains log messages from the Spring Framework. - errors.log
Contains only log messages that have at least the log level ERROR. - index.log
Contains log messages regarding the index. - mail.log
Contains log messages regarding email system. - operationtimes.log
Contains log messages with timing information for requests in order to identify possible performance bottlenecks. This logging is configured using the system property cmweb-server-adapter, request.log.threshold.milliseconds. - operationtimes-db.log
Contains log messages about database access times of atomic operations in order to identify possible performance bottlenecks. This logging is configured using the system properties cmas-core-server, dao.log.threshold.milliseconds and cmas-core-server, dao.log.username. - operationtimes-rest.log
Contains log messages with operation times for REST requests. The request URL and the time needed to process the request are logged on DEBUG level. The logging is configured using the system properties cmas-restapi-core, request.log.threshold.milliseconds and cmas-restapi-core, request.log.username. - security.log
Contains log messages which are related to security, authorization and authentication - server.log
Contains all log messages with at least log level INFO. - session.log
Contains log messages about logins (session starts) and session timeouts of users. - sql.log
Contains log messages about SQL statements coming from Hibernate if it is set to DEBUG level (by default it is set to INFO). - support_libs_errors.log
Contains error messages which are thrown by supporting libraries but are properly handled by ConSol CM (this method keeps the server.log clean). - timer-manager.log
Contains additional log messages written in log level DEBUG when workflow timers are activated or deactivated. Information about the escalation date is logged, too. - track_jersey.log
Contains log messages from CM/Track. - transfer.log
Contains log messages about the export / import of scenes. - tx.log
Contains log messages related to Spring Framework transactions. - unit-deletion.log
Contains information regarding the deletion of contacts. - workflow.log
Contains log messages about activated / reinitialized / deactivated timers, which are logged with level INFO and all debug output related to the workflow engine.
Structure of log files
In the default configuration, the log file entries have the following syntax:
Date Timestamp Loglevel [Logger] Message
Example for a log file entry:
2020-10-11 13:52:44,526 INFO [reemarker.FreeMarkerConfigurer] [-] ClassTemplateLoader for Spring macros added to FreeMarker configuration
The components of the message:
- Date:
October 11th, 2020 - Timestamp:
13:52:44 - Log level:
INFO - Logger:
reemarker.FreeMarkerConfigurer
Name of a Java class, not complete (only last 30 characters), the real name would be Freemarker.FreeMarkerConfigurer - Message:
ClassTemplateLoader for Spring macros added to FreeMarker configuration
Simple messages and messages reporting a successful operation often have only one line. When errors are reported (log level ERROR), you might find stack traces in the logs.
Basic tasks
Accessing the log files using the Web Admin Suite.
You can access the log files which are saved in the default directory on the Log files page in the Operation menu. When opening the page, the latest lines of the server.log file are displayed.
You can perform the following actions on the page:
- View a log file
Select the desired log file in the selector on the left side. All the log files which are saved in the default directory, <JBOSS_HOME>/standalone/log, are available. You can click the Full screen icon to view the log file in full screen mode. The Wrap text / Unwrap text icon allows you to decide whether the log messages should be wrapped or not. - Download log files
Click the Download log files button and select the log files which you want to download. The currently displayed log file is preselected. You can select additional log files to download several files at once. If several files are selected, they are downloaded as zip package. You can click the Download all log files button to add all log files to the zip package. - Refresh log files
By default, the log files are refreshed every 5 seconds. If needed, you can change the selector to Refresh every second or Do not refresh automatically. You can reload the log files manually at any time by clicking the Refresh icon. - Configure display order
The newest lines are displayed at the top if the checkbox Display newest lines first is selected. Deselect his checkbox to display the oldest lines first.
Add logging to scripts
You can add log output to your scripts by using the log statement with the desired log level.
log.info "This is my log message."
DEBUG messages will only appear in the log file when the logging configuration has been changed. Check whether debugging is switched on to avoid unnecessary operations:
if (log.isDebugEnabled()) {
log.debug("Processing ticket ${ticket.name}")
}
Advanced tasks
Configuring logging
The default path for the log files is <JBOSS_HOME>/standalone/log. The location of the log files and the logging behavior can be configured in the respective configuration files:
- cm6-config.properties
(JBoss EAP / Wildfly standalone installations with or without CMRF) - cm6-domain-config.properties
(JBoss EAP cluster installation) - cmrf.properties
(CMRF as a standalone application)
See Configuring the log files for details.
Activating the access.log file
In a default installation, the following lines in the configuration file, cm6-<DB>.xml or cm6-dwh-<DB>.xml are commented out. By commenting them in, you can start access logging in your ConSol CM system.
<server name="default-server">
<http-listener name="default" max-post-size="${max-post-size-bytes:104857600}"
socket-binding="http"
redirect-socket="https"
enable-http2="true"/>
<ajp-listener name="ajp" socket-binding="ajp"
max-post-size="${max-post-size-bytes:104857600}"/>
<https-listener name="https" max-post-size="${max-post-size-bytes:104857600}"
socket-binding="https"
ssl-context="applicationSSC"
enable-http2="true"/>
<host name="default-host" alias="localhost"><!--
<access-log pattern="%h %l %u %t %r %s %b %{Referer}i %{User-Agent}i %S %T" directory="${jboss.server.log.dir}" prefix="access" suffix=".log" worker="default"/>
--><location name="/" handler="welcome-content"/>
<http-invoker/>
</host>
</server>