Rolling Flat File Trace Listener

Topics: Building and extending application blocks, Logging Application Block
Jun 10, 2009 at 2:26 PM

Is there a way to configure the listener to create up to say 100 files of a given size before overwriting them?

Just started looking into the logging application block for a new project and wondered whether this is possible without creating a custom trace listener.

I want a way to log lots of information, without having too much information in each log file, but not have too many log files that use up all the disk space over time.

Any ideas or recommendations about this?  There might be other/better ways to limit the total size of all log files that I haven't thought of.

(Don't really want to create a scheduled task to delete old log files... but I guess I could do this if this if this is the recommended way of doing this)



Jun 11, 2009 at 2:04 AM

There's no way to tell the file-based tracelisteners how many file they should create before overwriting them.  You've already mentioned your 2 possible options which is to create a scheduled task that will do the work of deleting files when necessary or to create a custom tracelistener.


Sarah Urmeneta
Global Technology & Solutions
Avande, Inc.