Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
–1 vote
410 views
in CompleteFTP by (110 points)
Can you choose which log file (Audit,Config,Diagnostic,Error) an appender uses within the Log4Net LogConfig.xml file? It seems to default to the Diagnostics.log file but is it possible to point the configuration to a different log file, such as the Audit.log? Thanks!

1 Answer

0 votes
by (9.1k points)
edited by

Please see our user guide here

To remove a logging appender please go to: 

C:\Program Files (x86)\Complete FTP\Server\CompleteFTPService.exe.config

Then please open this up in a text editor. Scroll down to: 

'Setup the root category, add the appenders and set the default level'

The default shows as below:

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

Remove the logging methods which you no longer require, e.g. if you only require Audit logging, but no other then please change to the below:

<root>

  <level value="ALL" />

  <appender-ref ref="Audit" />

</root>

by (110 points)
Thank you very much for your very prompt response, Stuart. That sure answers my question. However, it raises another...

Does that then mean that each log can only be essentially "globally" toggled across the various default and/or custom appenders? For instance, we know you could configure multiple appenders for various sinks/destinations. But is there a way to configure a specific appender to read only a specific CompleteFTP log (Audit,Config,Diagnostic,Error) as a source? eg, leave all default logs (aforementioned) enabled for all default appenders (ConsoleAppender, TraceAppender, Audit, Config, Recent Logging Messages, Recent Error Messages)... and then come in afterwards and say add a AdoNetAppender which reads only a specific CompleteFTP log (eg, Audit) and then writes to its AdoNet destination.

I'm able to get an AdoNetAppender writing to SQL fine. But it appears to be writing the Diagnostic log (which is a bit verbose for my current requirements)... and I'm having trouble finding where one would configure the source-log-targeting in the Log4Net markdown and documentation, as well as the CompleteFTP documentation. I would like this SQL sink to receive the contents of only the Audit log.

Is that possible at all? If so, is it configurable at the Log4Net (LogConfig.xml) level, or the CompleteFTP level (UI).

Many thanks for your assistance on this.

Categories

...