Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 ClientConfig XML File for Operator Client and Forecasting Shell Servers - 2018.02 and later.)- 2021.01.

  1. Temporarily rename the clientConfig file for an OC to prevent it is overwritten with the uploaded file.
  2. 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

...

  1. .

...

  1.  

...

The default log file is configured as follows using the Log4jConfig.xml:

  1. Code Block
    language

...

  1. xml
    <?xml

...

  1.  

...

  1. version="

...

  1. 1.0" 

...

  1. encoding="

...

  1. 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>


  2. 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
languagexml
...
<root>
   <priority value="INFO"/>
...

into

Code Block
languagexml
...
 <root>
   <priority value="DEBUG"/>
...

 

The following table shows for the most relevant components what log configuration files are available:

ComponentLog configuration
Operator ClientLog4jConfig.xml
ConfigManagerLog4jConfig-ConfigurationManager.xml
Forecasting ShellLog4jConfig-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