Cerberus Secure and Reliable File Transferring Made Easy!
Support

Logging Support

ToC

Auditing

Cerberus FTP Server provides comprehensive logging of all file and user operations and provides both on-screen logging, file logging, and Syslog support. File-based logging can be managed through an XML configuration file that can control nearly all aspects of how log data is written to a file.

Log File Location

Cerberus FTP Server logging is implemented through the Apache Log4cxx framework, a robust logging package modeled after the popular log4j Java logging package. The default configuration logs up to 5000KB of data to a single file and then rolls over to a new log file. The past 10 log files are kept by default but log file size, naming, and history are all completely configurable through the log4j.xml file.

The log is located under:

C:\ProgramData\Cerberus LLC\Cerberus FTP Server\log on Windows Vista, Windows 2008 and above

and

C:\Documents and Settings\All Users\Application Data\Cerberus LLC\Cerberus FTP Server\log on Windows 2003, XP, and 2000.

You can also open the log file by simply clicking on the Open Log File link on the Log tab of the main user interface console as demonstrated below:

Open Log file link
The Open Log File link on the main user interface

Configuring Logging

The log4j.xml configuration file is one level above in the "Cerberus FTP Server" folder. An example log4j.xml file is below. 

There is an example of a size-based log appenders which roll over after the log file reaches a certain maximum size and that limit the number of log files that are kept.  These types of loggers are limited to at most 13 saved log files.

There is also daily log file appender example (with no maximum number of kept log file limits), and a Syslog log appender example.

 	
 <?xml version="1.0" encoding="UTF-8" ?>
 <log4j:configuration xmlns:log4j='http://logging.apache.org/' debug="false">
  
	<!-- A Size-based log file that rolls over to a new file after 5000KB and keeps 
			at most 5 log files -->
	<appender name="FILE" class="org.apache.log4j.rolling.RollingFileAppender">
		<rollingPolicy class="org.apache.log4j.rolling.FixedWindowRollingPolicy" >
			<param name="activeFileName" value="log/server.log" />
			<param name="fileNamePattern" value="log/server.%i.log" />
			<param name="minIndex" value="1" />
			<param name="maxIndex" value="5" />
		</rollingPolicy>
		<triggeringPolicy class="org.apache.log4j.rolling.SizeBasedTriggeringPolicy">
			<param name="maxFileSize" value="5000KB" />
		</triggeringPolicy>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" 
				value="[%d{yyyy-MM-dd HH:mm:ss}]:%7.7p [%6.6x] - %m%n" />
		</layout>
	</appender>  

	<!-- Add a Daily log file appender that will roll over to a new log file each night -->
	<appender name="DAILY" class="org.apache.log4j.DailyRollingFileAppender">
		<param name="File" value="log/daily_server.log" />
		<param name="DatePattern" value="'.'yyyy-MM-dd"/>
		<param name="Append" value="true"/>
		<param name="Threshold" value="INFO"/>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" 
				value="[%d{yyyy-MM-dd HH:mm:ss}]:%7.7p [%6.6x] - %m%n" />
		</layout>
	</appender>

	<!-- Add an appender that logs all errors to a separate log file -->
	<appender name="ERROR_FILE" class="org.apache.log4j.rolling.RollingFileAppender">          
		<rollingPolicy class="org.apache.log4j.rolling.FixedWindowRollingPolicy">
			<param name="activeFileName" value="log/server_error.log"/>
			<param name="fileNamePattern" value="log/server_error.%i.log"/>
		</rollingPolicy>
		<triggeringPolicy class="org.apache.log4j.rolling.SizeBasedTriggeringPolicy">
			<param name="maxFileSize" value="5000KB"/>
		</triggeringPolicy>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" 
				value="[%d{yyyy-MM-dd HH:mm:ss}]:%7.7p [%6.6x] - %m%n"/>
		</layout>
		<filter class="org.apache.log4j.varia.LevelRangeFilter">
			<param name="LevelMin" value="ERROR" />
		</filter>
	</appender>

	<!-- Add a Syslog appender -->
	<appender name="syslog" class="org.apache.log4j.net.SyslogAppender">
		<param name="SyslogHost" value="127.0.0.1"/>
		<param name="Facility" value="USER"/>
		<param name="FacilityPrinting" value="true"/>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" 
			    value="%t %5r %-5p %-21d{yyyyMMdd HH:mm:ss,SSS} %c{2} [%x] %m %n"/>
		</layout>
	</appender> 

		 
	<root>
		<level value="INFO" class="org.apache.log4j.xml.XLevel" />
		<appender-ref ref="FILE"/>
		<appender-ref ref="DAILY"/>
		<appender-ref ref="ERROR_FILE"/>
		<appender-ref ref="syslog"/>
	</root>
 </log4j:configuration>
		

Possible values for the <level value="level" class="org.apache.log4j.xml.XLevel" /> tag's level parameter are:

  • TRACE
  • DEBUG
  • INFO
  • WARN
  • ERROR

Screen Logging Settings

 

Server manager logging settings page
Logging settings page

In addition to the file-based log, Cerberus also displays the current log output to the graphical user interface while the server is running. Options for the screen-based logging can be controlled through the Logging settings tab of the Server Manager. Note that the options on the Logging page are only applicable to the onscreen logger.

  • Log messages to screen - Enable logging messages to the screen
  • Onscreen log length - The number of lines of on-screen logging that should be saved

Syslog Support

Cerberus FTP Server 5.0 supports Syslog integration from the logging page.

  • Enable Syslog logging - Enable syslog logging
  • Syslog Host - The address of the machine hosting the syslog server.
  • Syslog Facility - The syslog facility value that should be associated with the syslog events.