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:

Available log files

The following log files are available in ConSol CM:

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:

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:

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:

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>