C.0 Logging Configuration File

F/X Monitor logging uses the Apache log4j project as standard and expects the logging configuration file to be defined using an XML format.

Log4j configuration consists of appenders (sources to receive logging) and configuration of the appenders to use.

The supplied example is shown in the following example. It configures a log file and stdout in the <appender> tags and references their use in the <root> tag. For example, STDOUT logging can be suppressed by commenting out or removing the <appender-ref ref="STDOUT"/> tag.

Further detail on log4j logging configuration can be found at http://logging.apache.org/log4j/docs/manual.html:

<?xml version="1.0" encoding="UTF‑8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

  <appender name="A1" class="org.apache.log4j.FileAppender">
    <!-- change this to be your log filename -->
    <param name="File"   value="fxmonitor.log" /> 
    <!-- if you want a new file each run or not... -->
    <param name="Append" value="true" />        
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%t %‑5p %c{2} ‑ %m%n"/>

  <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
    <layout class="org.apache.log4j.PatternLayout">
           <param name="ConversionPattern" value="%d{DATE} %‑5p %c ‑ %m%n"/>
    <priority value="info"/>
    <appender-ref ref="STDOUT"/>
    <appender-ref ref="A1"/>