enterprise Library XML Logging RRS feed

  • Question

  • User-1284875295 posted


    I am using Enterprise 3.0  library Application block  for Exception handling and logging.

    I need to logging into an XML file with Rollback, I tried the following listeners.

    but  the XML file Generated is not well formed


    RollingFlatFileTraceListener with header as <logentry> and footer as </logentry>

    Problem i have a series of <logentry> elements but the XML generated is not well formed




    problem no rolling back

    can any body encountered problem like this

    is there any trace listener to do this

    ie i need to have a well formed xml as the log





    Wednesday, June 25, 2008 12:43 AM

All replies

  • User-1284875295 posted


     i  can explain my problem more specific as follows

    <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p> <o:p> </o:p>This is regarding the “XML file logging” for exception information occurred in the application using Enterprise Library 3.1<o:p></o:p><o:p> </o:p>If multiple times the application logs the exception, it creates new node entry and IE browser cannot view the xml as it breaks the XML well form. <o:p></o:p><o:p> </o:p>Please find the listeners being used in the mail below <o:p> </o:p>Using Enterprise Library 3.1, Is there any way we can maintain the XML well form if multiple entries are done?<o:p></o:p><o:p> </o:p>Any workaround or suggestions would be welcome.<o:p></o:p><o:p> </o:p>Regards,<o:p></o:p>


    <o:p> </o:p><o:p> </o:p><o:p> </o:p>    <listeners><o:p></o:p>      <add fileName="Log.xml" rollSizeKB="5" timeStampPattern="yyyy-MM-dd"<o:p></o:p>        rollFileExistsBehavior="Increment" rollInterval="None" formatter="Text Formatter"<o:p></o:p>        header="&lt;LogEntry&gt;" footer="&lt;/LogEntry&gt;" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"<o:p></o:p>        traceOutputOptions="LogicalOperationStack" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"<o:p></o:p>        name="Rolling Flat File Trace Listener" /><o:p></o:p>    </listeners><o:p></o:p><o:p> </o:p>


    Wednesday, June 25, 2008 12:55 AM