Activating debug mode
...
ForecastingShell Server
FSS: Set the system environment environment variable LOG4J_DEBUG to true (system wide environment variable or local variable for the same service account in which the forecasting shell is running).
Operator Client
OC: (See also 08 Root Configuration Files ClientConfig XML File for Operator Client and Forecasting Shell Servers .)- 2018.02 - 2021.01.
- Temporarily rename the clientConfig file for an OC to prevent it is overwritten with the uploaded file.
Set logging / debugEnabled to true in
the clientConfig.xml.Ignore the error message aboutthe clientConfig
xml not being available in the central database.
Logging up to 2017.02 using a Log4jConfig.xml
...
.xml
...
.
...
...
The default log file is configured as follows using the Log4jConfig.xml:
Code Block language
...
xml <?xml
...
...
version="
...
1.0"
...
encoding="
...
UTF-8"?> <clientConfiguration xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/clientConfig.xsd"> <clientType>Stand alone</clientType> <logging> <debugEnabled>true</debugEnabled> </logging> </clientConfiguration>
- Ignore the error message about the clientConfig xml not being available in the central database.
Stand alone
Activate the "W debug logging enabled" option in the F12 menu.
...
Configuring the default log file using a rolling file appender is configured as follows using the Log4jConfig.xml:
...
<appender name="defaultLogFile" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${log.file.path}"/>
<param name="MaxFileSize" value="20MB"/>
<!-- Keep 5 backup file -->
<param name="MaxBackupIndex" value="5"/>
<param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d] %p - %C{1}.%M - %m%n"/>
</layout>
</appender>
How to activate debug logging
Additional debug mode logging can be activated by editing the appropriate log configuration file and restarting the component.
At the bottom of relvant log4j configuration file alter the
Code Block | ||
---|---|---|
| ||
...
<root>
<priority value="INFO"/>
... |
into
Code Block | ||
---|---|---|
| ||
...
<root>
<priority value="DEBUG"/>
... |
The following table shows for the most relevant components what log configuration files are available:
Component | Log configuration |
---|---|
Operator Client | Log4jConfig.xml |
ConfigManager | Log4jConfig-ConfigurationManager.xml |
Forecasting Shell | Log4jConfig-MCListener.xml, Log4jConfig-MCLogCollectorService.xml |
Master controller | Log4jConfig-FSListener.xml, Log4jConfig-MCLogCollectorService.xml, Log4jConfig-MCRestarter.xml, Log4jConfig-OCListener.xml, Log4jConfig-RemoteQueueProxy.xml, Log4jConfig-Synchronisation.xml, Log4jConfig-SystemMonitor.xml, Log4jConfig-TaskManager.xml |