Log4j Logging

20.2. Log4j Logging

Log4j Logging #

Technical logging is primarily done using the common log4j logging framework.

The log4j configuration file for SICS Workstation and SICS System Administration Utility, is found in:
<installation path>\runtime\conf\log4j2.xml

The configuration for SICS API Server products is stored in:
WEB-INF/classes/log4j2.xml

Both files contain comments explaining the use of the various logging possibilities. Please refer to those files for details.

Asynchronous logging #

Asyncouneous logging is per default disabled.

This option is controlled by file conf/log4j.component.properties.

Default configuration #

######################################################################################
#                                                                                    #
# Enable this property to switch on asynchronous logging (performance improvement)   # 
#                                                                                    #
######################################################################################
#log4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector

Enable asynchronous logging #

To enable asynchronous logging, please uncomment option log4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector, like the following example:

######################################################################################
#                                                                                    #
# Enable this property to switch on asynchronous logging (performance improvement)   # 
#                                                                                    #
######################################################################################
log4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector

Benefits of asynchronous logging #

Asynchronous logging can improve the applications performance, especially when logging to file or other high-latency mediums, and log intensive settings are in use (for example SQL logging).

More information can be found at:
https://logging.apache.org/log4j/2.x/manual/async.html