Versions Compared

Key

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

Activating debug mode

...

ForecastingShell Server

Set the system

...

environment variable LOG4J_DEBUG to true

...

for the

...

service account in which the forecasting shell is running.

Operator Client

See also ClientConfig XML File for Operator Client and Forecasting Shell Servers - 2018.02 - 2021.01.

  1. ).Set logging / debugEnable to true in the clientConfig.xml. (Temporarily rename the clientConfig file for an OC to prevent it is overwritten with the uploaded file) See 01 Root Configuration Files for Operator Client.

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:

...

<appender name="defaultLogFile" class="org.apache.log4j.FileAppender">
	<param name="File" value="${log.file.path}"/>
	<param name="Append" value="false"/>
	<layout class="org.apache.log4j.PatternLayout">
	<param name="ConversionPattern" value="[%d] %p - %C{1}.%M - %m%n"/>
	</layout>
</appender>

 

...

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>
  1. Set logging / debugEnabled to true in the clientConfig.xml. 

    Code Block
    languagexml
    <?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>


  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.

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