Logging help

Topics: Logging Application Block
Jan 17, 2012 at 2:38 PM

 

I get strange messages, addressed to the EventId: 6352
Do you have any ideas?


---------------------------------------- Timestamp: 17.01.2012 14:10:46 Message: ... Timestamp: 17.01.2012 14:10:46 Message: ... Category: Info Priority: 2 EventId: 1 Severity: Information Title: Machine: ... App Domain: ... ProcessId: 4424 Process Name: ... Thread Name: Win32 ThreadId:1372 Extended Properties: Category: Priority: -1 EventId: 6352 Severity: Error Title: Machine: ... Application Domain: ... Process Id: 4424 Process Name: ... Win32 Thread Id: 1372 Thread Name: Extended Properties: ----------------------------------------

 

 

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    <section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </configSections>
  <loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
    <listeners>
      <add fileName="trace.log" header="----------------------------------------" footer="----------------------------------------" formatter="Text Formatter" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="FlatFile TraceListener"/>
    </listeners>
    <formatters>
      <add template="Timestamp: {timestamp}
Message: {message}
Category: {category}
Priority: {priority}
EventId: {eventid}
Severity: {severity}
Title:{title}
Machine: {machine}
Application Domain: {appDomain}
Process Id: {processId}
Process Name: {processName}
Win32 Thread Id: {win32ThreadId}
Thread Name: {threadName}
Extended Properties: {dictionary({key} - {value}
)}" type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Text Formatter"/>
    </formatters>
    <categorySources>
      <add switchValue="All" name="Debug">
        <listeners>
          <add name="FlatFile TraceListener"/>
        </listeners>
      </add>
      <add switchValue="All" name="General">
        <listeners>
          <add name="FlatFile 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="FlatFile TraceListener"/>
        </listeners>
      </errors>
    </specialSources>
  </loggingConfiguration>
  <exceptionHandling>
    <exceptionPolicies>
      <add name="Default Policy">
        <exceptionTypes>
          <add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" postHandlingAction="NotifyRethrow" name="Exception">
            <exceptionHandlers>
              <add logCategory="General" eventId="100" severity="Error" title="Enterprise Library Exception Handling" formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" priority="0" useDefaultLogger="true" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Logging Handler"/>
            </exceptionHandlers>
          </add>
        </exceptionTypes>
      </add>
    </exceptionPolicies>
  </exceptionHandling>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
  </startup>
</configuration>

 

 

Jan 18, 2012 at 1:19 AM

The event ID 6352 is a special event ID used internally by the Logging Block to indicate a failure to log occurred.  The strange part is the format of the message you are showing -- usually an exception message would appear.

Does this happen all the time or intermittently?  Do other messages log to the trace.log file?

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com 

Jan 18, 2012 at 1:39 PM

Apparently this is connected with the category Info, what's wrong?

---------------------------------------- Timestamp: 18.01.2012 13:26:27 Message: Setting the RegionManager. Category: Debug Priority: 3 EventId: 1 Severity: Information Title: Machine: MYPC Application Domain: ....vshost.exe Process Id: 1232 Process Name: ....vshost.exe Win32 Thread Id: 152 Thread Name: Extended Properties: ---------------------------------------- ---------------------------------------- Timestamp: 18.01.2012 13:26:27 Message: Updating Regions. Category: Debug Priority: 3 EventId: 1 Severity: Information Title: Machine: MYPC Application Domain: ....vshost.exe Process Id: 1232 Process Name: ....vshost.exe Win32 Thread Id: 152 Thread Name: Extended Properties: ---------------------------------------- ---------------------------------------- Timestamp: 18.01.2012 13:26:27 Message: Initializing shell Category: Debug Priority: 3 EventId: 1 Severity: Information Title: Machine: MYPC Application Domain: ....vshost.exe Process Id: 1232 Process Name: ....vshost.exe Win32 Thread Id: 152 Thread Name: Extended Properties: ---------------------------------------- ---------------------------------------- Timestamp: 18.01.2012 13:26:28 Message: Initializing modules Category: Debug Priority: 3 EventId: 1 Severity: Information Title: Machine: MYPC Application Domain: ....vshost.exe Process Id: 1232 Process Name: ....vshost.exe Win32 Thread Id: 152 Thread Name: Extended Properties: ---------------------------------------- ---------------------------------------- Timestamp: 18.01.2012 13:26:28 Message: There is no explicit mapping for the categories 'Info'. The log entry was: Timestamp: 18.01.2012 13:26:28 Message: Constructor ... Category: Info Priority: 2 EventId: 1 Severity: Information Title: Machine: MYPC App Domain: ....vshost.exe ProcessId: 1232 Process Name: ....vshost.exe Thread Name: Win32 ThreadId:152 Extended Properties: Category: Priority: -1 EventId: 6352 Severity: Error Title: Machine: MYPC Application Domain: ....vshost.exe Process Id: 1232 Process Name: ....vshost.exe Win32 Thread Id: 152 Thread Name: Extended Properties: ---------------------------------------- ---------------------------------------- Timestamp: 18.01.2012 13:26:29 Message: There is no explicit mapping for the categories 'Info'. The log entry was: Timestamp: 18.01.2012 13:26:29 Message: Constructor ... Category: Info Priority: 2 EventId: 1 Severity: Information Title: Machine: MYPC App Domain: ....vshost.exe ProcessId: 1232 Process Name: ....vshost.exe Thread Name: Win32 ThreadId:152 Extended Properties: Category: Priority: -1 EventId: 6352 Severity: Error Title: Machine: MYPC Application Domain: ....vshost.exe Process Id: 1232 Process Name: ....vshost.exe Win32 Thread Id: 152 Thread Name: Extended Properties: ---------------------------------------- ---------------------------------------- Timestamp: 18.01.2012 13:26:29 Message: There is no explicit mapping for the categories 'Info'. The log entry was: Timestamp: 18.01.2012 13:26:29 Message: Constructor ... Category: Info Priority: 2 EventId: 1 Severity: Information Title: Machine: MYPC App Domain: ....vshost.exe ProcessId: 1232 Process Name: ....vshost.exe Thread Name: Win32 ThreadId:152 Extended Properties: Category: Priority: -1 EventId: 6352 Severity: Error Title: Machine: MYPC Application Domain: ....vshost.exe Process Id: 1232 Process Name: ....vshost.exe Win32 Thread Id: 152 Thread Name: Extended Properties: ----------------------------------------

Jan 18, 2012 at 2:19 PM

Thanks for the extra information -- that helps. 

You are trying to log to a category called "Info" but there is no such category defined in the configuration file.  Since the configuration file is set to log unprocessed categories ( <notProcessed switchValue="All" name="Unprocessed Category"/> ) you are seeing the message "There is no explicit mapping for the categories 'Info'".

You can add the category "Info" to handle the category or supress the logging of unprocessed messages by setting the switchValue for notProcessed to "Off".

 

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com

Jan 19, 2012 at 3:34 PM

Thanks. It work!