How to configure the log file storage

by Michela Frigerio
708 views Published on Feb 16, 2023
Applies to: 9.0 or higher
Table of contents

Each application has a couple of log files to which it write log messages to monitor the health of the running application. You can configure where these log files are stored in the file placed in the WEB-INF/conf directory of the application. First of all you must decide whether the log folder is absolute or not (default). You must set the "logDirectoryIsAbsolute" property.


When the log directory is set to be absolute you can then specify which is the log directory by setting an absolute path in the "logDirectory" property.

logDirectory = <absolute-path-to-log-directory>

# Example
logDirectory = "C:/myComputer/myApp"

It’s also possible to specify a system property which sets the folder containing the AppLogConfig.xml file which sets the application logs levels. By default, this file is stored in the WEB-INF/conf folder of the application.


# Example

The system property must then be configured in the application server using the following syntax. Please be aware that this configuration must be merged with the one already present in the application server.

set JAVA_OPTS = -DlogConfigDir=<absolute-path-to-log-config-directory>

# Example
set JAVA_OPTS = -DlogConfigDir=C:\myComputer\myApp\log-config

Related Learning Objects