Enterprise Lib 2.0 Logging issue

Aug 13, 2007 at 5:56 PM
Hi all...

I'm having an issue with logging using Enterprise Lib 2.0. I belive that we have created the config file correctly. It seems that sometimes it works and other it does not. We are using a custom dll on two different servers. One where we have an exe that gets executed via task scheduler, then another instance where the logging is being done via a web service. I was hoping that someone might be able to give some input as to why logging would not occur.

Config XML below if anyway is able to help.

Thanks
Rick



<loggingConfiguration name="Logging Application Block" tracingEnabled="true"
defaultCategory="Trace" logWarningsWhenNoCategoriesMatch="true">
<listeners>
<add fileName="D:\Logs\Errors.log"
header="" footer="----------------------------------------"
formatter="Text Formatter" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4882fee57024bc0a"
traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4882fee57024bc0a"
name="DefaultFlatFileExceptionsListener" />
<add fileName="D:\Logs\Trace.log"
header="" footer="----------------------------------------"
formatter="Text Formatter" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4882fee57024bc0a"
traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4882fee57024bc0a"
name="DefaultFlatFileTraceListener" />
</listeners>
<formatters>
<add template="{message}" type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4882fee57024bc0a"
name="Text Formatter" />
</formatters>
<categorySources>
<add switchValue="All" name="Exception">
<listeners>
<add name="DefaultFlatFileExceptionsListener" />
</listeners>
</add>
<add switchValue="All" name="Trace">
<listeners>
<add name="DefaultFlatFileTraceListener" />
</listeners>
</add>
</categorySources>
<specialSources>
<allEvents switchValue="All" name="All Events" />
<notProcessed switchValue="All" name="Unprocessed Category" />
<errors switchValue="All" name="Logging Errors & Warnings" />
</specialSources>
</loggingConfiguration>