Rolling Flat File - RollInterval - Difference between "Midnight" and "Day"?

Topics: Logging Application Block
Jan 9, 2009 at 1:22 AM
For the Rolling Flat File "RollInterval" configuration attribute, what is the difference between the "Midnight" and "Day" options?

Thanks,
David
Jan 9, 2009 at 4:24 AM
Hi David,

"Midnight" rolls the log file at 12:00am the next day, whereas "Day" rolls the log file the next Day interval.
Eg: If the log file was initially created by Jan 5, 2009 9:00AM 
    -  "Midnight" should start a new log file at Jan 6, 2009 12:00AM
    - "Day" should start a new log file by Jan 6, 2009 9:00AM.


Rhea Echevarria
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com
Jan 9, 2009 at 10:29 PM
Thanks Rhea!

I have a follow up question regarding the "Midnight" setting.  By default, logging times are written in UTC but I see that the rollover occurs at midnight local time.
To be consistent, shouldn't the rollover time be at midnight UTC?
Is UTC vs. local time of the midnight rollover configurable?

David
Jan 13, 2009 at 4:20 AM
Edited Jan 13, 2009 at 4:23 AM
I'm not sure if it's by design decision but I would try to get an answer.  Regarding on configuring the rollover time, I don't think you can change it unless you modify the entlib source code. 


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com
Feb 10, 2009 at 9:00 PM

In the next version of EntLib we'll consider whether the local time should be changed to UTC.

Grigori

Feb 20, 2009 at 8:49 PM
Hi Grigori,

Thanks for you response.

Possibly your could make it configurable between UTC and local in the next release?  E.g. the setting could be "Midnight" or "MidnightUtc".

David