pvs4ever

pvs4ever

  • NA
  • 1
  • 0

EnterpriseLibrary 3.1.0.0 - Rolling Flat File Trace Listener to generate a separate log file everyday

Mar 6 2008 11:37 PM

Hi all,

I have implemented code like following. 

<add fileName="trace.log" rollSizeKB="0" timeStampPattern="yyyy-MM-dd" rollFileExistsBehavior="Overwrite" rollInterval="Day" header="----------------------------------------" footer="----------------------------------------" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" name="Rolling Flat File Trace Listener"/>

  If i changed the system date manually then its working fine, a new file is created with the current date.

But the cases like

  if i starts the application on 6th March 2008 11:59:00 PM , And working till 7th March 00:05:02 AM. Its not creating any new log file with the current date.Its logging only at "trace.log".

Please help me how to resolve this..

Thanks in Advance,

PVS