Sporadic Error with Logging 3.1

Topics: Logging Application Block
Nov 24, 2009 at 3:19 PM

Good morning

We are using the Ent 3.1 logging to a sql server database inside a web application at one of our clients.  It works 99% of the time perfectly.  We have received the following error twice in the past quarter seeemingly without provocation

Tracing to LogSource 'PickServer' failed. Processing for other sources will continue. See summary information below for more information. Should this problem persist, stop the service and check the configuration file(s) for possible error(s) in the configuration of the categories and sinks. Summary for Enterprise Library Distributor Service

The support person recycled IIS and the application started logging again as if nothing had happened.  I could understand the error if it happened all the time but so far now only twice and upon recycling the problem goes immediately away.  The app is running in IIS on a Windows 2K3 machine and the app is done in C# using fw 2.0.  Any insight would be appreciated.

 

Thanks

 

 

Sanitized part of web config

<?xml version="1.0"?>
<configuration>
  <configSections>
 <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  </configSections>
 <loggingConfiguration name="Logging Application Block" tracingEnabled="true"
  defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
  <listeners>
   <add databaseInstanceName="LoggingDB" writeLogStoredProcName="WS_WriteLog"
     addCategoryStoredProcName="AddCategory" formatter="DB Text Formatter"
     listenerDataType="Logging.DBTraceListenerData,Logging"
     traceOutputOptions="None" type="Logging.DBTraceListener, Logging"
     name="Database Trace Listener" />
   <add source="Enterprise Library Logging" formatter="Text Formatter"
     log="Application" machineName="" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
     traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
     name="Formatted EventLog TraceListener" />
   <add toAddress="*****@******.com" fromAddress="*****@*****.com"
   subjectLineStarter="Warning" subjectLineEnder="." smtpServer="******.*****.*****"
   smtpPort="25" formatter="" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.EmailTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
   traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.EmailTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
   name="Email TraceListener" />
  </listeners>
  <formatters>
   <add template="Timestamp: {timestamp}&#xD;&#xA;Category: {category}&#xD;&#xA;Title: {title}&#xD;&#xA;Message: {message}"
     type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
     name="Text Formatter" />
   <add template="Message: {message}"
     type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
     name="DB Text Formatter" />
  </formatters>
  <categorySources>
   <add switchValue="All" name="General">
    <listeners>
     <add name="Database Trace Listener" />
     <add name="Formatted EventLog TraceListener" />
    </listeners>
   </add>
   <add switchValue="All" name="PickServer">
    <listeners>
     <add name="Database Trace Listener" />
     <add name="Formatted EventLog TraceListener" />
    </listeners>
   </add>
   <add switchValue="All" name="Export">
    <listeners>
     <add name="Database Trace Listener" />
     <add name="Formatted EventLog TraceListener" />
    </listeners>
   </add>
  </categorySources>
  <specialSources>
   <allEvents switchValue="All" name="All Events" />
   <notProcessed switchValue="All" name="Unprocessed Category" />
   <errors switchValue="All" name="Logging Errors &amp; Warnings">
    <listeners>
     <add name="Database Trace Listener" />
     <add name="Formatted EventLog TraceListener" />
     <add name="Email TraceListener"/>
    </listeners>
   </errors>
  </specialSources>
 </loggingConfiguration>
  <dataConfiguration defaultDatabase="main" />
  <connectionStrings>
 [removed]
  </connectionStrings>
 
  <appSettings>
   
  </appSettings>
  <system.web>
    <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
        -->
    <compilation debug="true" />
    <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        -->
    <authentication mode="Windows" />
    <!--
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
  </system.web>
</configuration>

 

Nov 25, 2009 at 2:45 AM

Wasn't there any inner exception message included in the error log?  Does the logging only fail for the PickServer category?  I'm thinking if it has something to do with database connections...

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com