How to start a new log file every day

Topics: Logging Application Block
Feb 9, 2007 at 11:40 PM
Hi!! I've been using the looging application block in a production system from some time ago, using the block to make trace of all db commands that are being processed from the application. This creates a huge trace file, so I have to filter the trace always to avoid creating big log files. Is there a way to configure the application block so it creates the trace file one by one every day? By example in january first it would log all the trace to a file called Trace20070101.log, in january second it would log the trace to a file called Trace20070102.log, etc. So I would have in a year 365 smaller files, and not one huge file.

Ps. sorry for my poor english!!
Feb 10, 2007 at 12:10 AM
We don't support this in Enterprise Library 2.0, although there are a number of community extensions that provide this capability - see this post for details.

We are building a new "Rolling Flat File Trace Listener" in EntLib 3.0 which will support this. There is a version of this in the January CTP, although there are a number of known issues that we are working on fixing now.