Rolling Logging App Block every day

Topics: Logging Application Block
Jul 17, 2007 at 12:53 PM
using the latest may-2007 version of EAB, i want to use the rolling logger and create a new file every day. i have set the RollInterval=Day but what happens in reality is that because the application was started at 11 AM the files are rolled over when the file is older that a day (i.e. 11:00:01 AM). how can i make the files roll over at midnight (please no suggestions like start your application on midnight :-)
Jul 17, 2007 at 3:27 PM

Unfortunately the behavior for the RFTL is based on the time elapsed from the creation of the file, not on transitions of the current time, so it doesn't support the functionality you need. A third party trace listener may provide it.

Jul 17, 2007 at 6:47 PM
hi fernando,

thanks for the quick reply. i think my need is preety trivial for the RFTL. almost all apps that keep a log need to keep it in files based on date (e.g. IIS logs, SMTP logs...). funny that the EAB team didn't think of that trivial use while they did cerate a more complex and (in my opinion) less needed rolling over days.

anyone knows of a 3rd party trace listener that does that for EAB 3.1?

Dani Avni
Jul 26, 2007 at 12:17 PM
Do you know log4net? Perhaps this tool helps: