I am using Microsoft.Practices.EnterpriseLibrary.Logging version 4.0, and I have the following loggers configured in my Service.exe.config:
<configuration>
<configSections>
<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=23120fa21bb1ee49" />
</configSections>
<loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="" logWarningsWhenNoCategoriesMatch="false">
<listeners>
<add source="Enterprise Library Logging" formatter="Text Formatter" log="Application" machineName="" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=23120fa21bb1ee49" traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=23120fa21bb1ee49" name="Formatted EventLog TraceListener" />
<add enabled="true" formatter="Text Formatter" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.OutputDebugStringTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=23120fa21bb1ee49" traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.OutputDebugStringTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=23120fa21bb1ee49" name="OutputDebugString TraceListener" />
<add fileName="Log\ShellServices.log" footer="" formatter="Text Formatter" header="" rollFileExistsBehavior="Increment" rollInterval="Midnight" rollSizeKB="0" maxArchiveFilesSizeKB="100000" timeStampPattern="yyyy-MM-dd" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=23120fa21bb1ee49" traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=23120fa21bb1ee49" name="Rolling Flat File Trace Listener" />
</listeners>
<formatters>
<add template="{timestamp(local:yyyy-MM-dd HH:mm:ss.fff)} | {severity} ({priority}) | {category} | {message}" type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=23120fa21bb1ee49" name="Text Formatter" />
</formatters>
<categorySources>
<add switchValue="All" name="DebugView">
<listeners>
<add name="OutputDebugString TraceListener" />
</listeners>
</add>
</categorySources>
<specialSources>
<allEvents switchValue="All" name="All Events">
<listeners>
<add name="Rolling Flat File Trace Listener" />
</listeners>
</allEvents>
<errors switchValue="All" name="Logging Errors & Warnings">
<listeners>
<add name="Formatted EventLog TraceListener" />
</listeners>
</errors>
</specialSources>
</loggingConfiguration>
</configuration>
It seems that on all of a certain customer's servers when the Rolling Flat File Trace Listener hits its rollover time of midnight, the next log entry (when rollover actually occurs) will cause the service to freeze, requiring it to be killed via Task Manager. I've examined the code of both the service and the Microsoft library (using dotPeek), and I cannot see anything that could cause a deadlock or an infinite loop.
Does anyone have suggestions for what else I should be looking for?