Enterprise Library 4.0 Rolling log file, How to create it with current date ?

Topics: Logging Application Block
Apr 18, 2009 at 7:00 AM
Hi all,

 I am using Ent lib 4.0 logging block rolling flat file.

It creates one file as filename.log and creates the file with date at the time of rolling (ex. at midnight / as specifie).

I want the currect file filename.log should be as filename2009-04-17.log instead which will be created at night as filename2009-04-18log at the time of rolling.

In that case i get previous day log in current date file..that is the problem I am facing

Apr 20, 2009 at 2:55 AM
Edited Apr 20, 2009 at 2:55 AM
I'm afraid this is not configurable in entlib.  You would have to modify the source code specifically the StreamWriterRollingHelper's CalculateNextRollDate method. 

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.