logging writes header but not message

Topics: Logging Application Block
Jan 8, 2009 at 6:45 PM
I'm having an issue where it appears that the header for my log message is being logged, but the rest of the message is not.  This is happening for only one of multiple sources (Exception) that all use the same listener.  The same configuration works correctly in other environments.  My logging configuration is below. 

The exception is happening during a web service call.  The client receives an error message indicating there was an internal server error, but there is no information as to what that error was.  Any ideas on why it would successfully log the header but fail to log the message?

<loggingConfiguration name="Logging Application Block" tracingEnabled="true"
  defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
 <listeners>
  <add fileName="c:\trace\ExternalServices.log" rollSizeKB="0" timeStampPattern="dd-MM-yyyy"
    rollFileExistsBehavior="Overwrite" rollInterval="Day" formatter="Text Formatter"
    header="----------------------------------------" footer="----------------------------------------"
    listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    traceOutputOptions="DateTime" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    name="Rolling Flat File Trace Listener" />
 </listeners>
 <formatters>
  <add template="Timestamp: {timestamp(local:dd-MMM-yyyy hh:mm tt)}&#xA; Message: {message}&#xA; Category: {category}&#xA; Priority: {priority}&#xA; EventId: {eventid}&#xA; Severity: {severity}&#xA; Title:{title}&#xA; Machine: {machine}&#xA; Application Domain: {appDomain}&#xA; Process Id: {processId}&#xA; Process Name: {processName}&#xA; Win32 Thread Id: {win32ThreadId}&#xA; Thread Name: {threadName}&#xA; Extended Properties: {dictionary({key} - {value}&#xA; )}" type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Text Formatter" />
 </formatters>
 <logFilters>
  <add categoryFilterMode="AllowAllExceptDenied" type="Microsoft.Practices.EnterpriseLibrary.Logging.Filters.CategoryFilter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Category Filter">
   <categoryFilters />
  </add>
 </logFilters>
 <categorySources>
  <add switchValue="All" name="Error">
   <listeners>
    <add name="Rolling Flat File Trace Listener" />
   </listeners>
  </add>
  <add switchValue="All" name="Exception">
   <listeners>
    <add name="Rolling Flat File Trace Listener" />
   </listeners>
  </add>
  <add switchValue="All" name="General">
   <listeners>
    <add name="Rolling Flat File Trace Listener" />
   </listeners>
  </add>
  <add switchValue="All" name="Service">
   <listeners>
    <add name="Rolling Flat File Trace Listener" />
   </listeners>
  </add>
 </categorySources>
 <specialSources>
  <allEvents switchValue="All" name="All Events" />
  <notProcessed switchValue="All" name="Unprocessed Category">
   <listeners>
    <add name="Rolling Flat File Trace Listener" />
   </listeners>
  </notProcessed>
  <errors switchValue="All" name="Logging Errors &amp; Warnings">
   <listeners>
    <add name="Rolling Flat File Trace Listener" />
   </listeners>
  </errors>
 </specialSources>
</loggingConfiguration>
Jan 9, 2009 at 3:35 AM
Edited Jan 9, 2009 at 8:09 AM
I'm not sure what the problem (it's actually weird) might be  but it would help if you could send your sample application.


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