Activating debug mode in 2018.02 and later
FSS: Set the system environment variable LOG4J_DEBUG to true (system wide environment variable or local variable for the same service account the forecasting shell is running).
- 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 about the clientConfig xml not being available in the central database.
SA: Activate the "W debug logging enabled" option in the F12 menu.
Logging up to 2017.02 using a Log4jConfig.xml
Configuring the log.txt file of FEWS can be done using the Log4jConfig.xml in the root of the FEWS directory. The logging is done using the log4j framework. See: http://logging.apache.org/log4j/1.2/
The default log file is configured as follows using the Log4jConfig.xml:
Note that Append is set to false (which is recommended to avoid creating very large log files), which means that FEWS will overwrite the logfile after a restart.
If append is set to false, at startup, FEWS will now rename the logfile with the .old extention (since 2015.01). This will make sure that one previous log file is available after FEWS started.
Alternatively, the logging can be configured using a so called RollingFileAppender. In this case the Append parameter is set to true. Now the size of the log files will be limited to a fixed size (20MB in the following example) and the number of backup copies is specified (MaxBackupIndex is 5 in this example). If a log file becomes larger than the specified size, a backup is created (creating files like: log.txt.1, log.txt.2, ...). Also after a restart, FEWS will append to the existing log files.
Configuring the default log file using a rolling file appender is configured as follows using the Log4jConfig.xml:
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
The following table shows for the most relevant components what log configuration files are available:
|Forecasting Shell||Log4jConfig-MCListener.xml, Log4jConfig-MCLogCollectorService.xml|
Log4jConfig-FSListener.xml, Log4jConfig-MCLogCollectorService.xml, Log4jConfig-MCRestarter.xml, Log4jConfig-OCListener.xml, Log4jConfig-RemoteQueueProxy.xml,
Log4jConfig-Synchronisation.xml, Log4jConfig-SystemMonitor.xml, Log4jConfig-TaskManager.xml