How to modify the logging configuration

CompleteFTP's sophisticated logging system is based on log4net. log4net is highly configurable. If modifications are to be made to the log4net configuration then the full log4net configuration should be placed into a file called LogConfig.xml, which should be placed in the directory, C:\ProgramData\Enterprise Distributed Technologies\Complete FTP\Logs. This will prevent changes from being overwritten when CompleteFTP is upgraded. The default log4net configuration may be found in C:\Program Files\Complete FTP\Server\CompleteFTPService.exe.config. The XML node, <log4net>, and all of its sub-nodes, should be copied into the LogConfig.xml file and used as a basis for a new configuration.

How to log to syslog

It is sometimes a requirement to direct logging output to syslog. This is normally a daemon that listens on UDP port 514. This can be done via the following steps.

  1. Create the LogConfig.xml file as described above
  2. Add a new appender section:
    <appender name="Syslog" type="log4net.Appender.RemoteSyslogAppender">
        <param name="RemoteAddress" value="127.0.0.2" />
        <layout type="log4net.Layout.PatternLayout" value="%-5p %type: %m%n"/>
    </appender>
    and add an appender reference to the list of existing appenders:
    <root>
    	<level value="ALL" />
    	<appender-ref ref="Recent Logging Messages" />
    	<appender-ref ref="Recent Error Messages" />
    	<appender-ref ref="Syslog" />
    	<appender-ref ref="Audit" />
    	<appender-ref ref="Config" />
    </root>
  3. Restart the CompleteFTP service to reread the configuration file.

CompleteFTP should now be logging to syslog.