locked
remove stack trace , Additional Info, <auto-generated> from log file RRS feed

  • Question

  • User-466335242 posted

    i am using belowcode in web.config 

    <loggingConfiguration name="" tracingEnabled="true" defaultCategory="General">
        <listeners>
          <add name="Rolling Flat File Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" fileName=".\Logs\jeejix_error.log" footer="------------Error End----------------------------" formatter="Text Formatter" header="---------Error Start-------------------------------" rollFileExistsBehavior="Increment" rollInterval="Day" rollSizeKB="50" />
        </listeners>
        <formatters>
          <add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
               template="Message: {message}&#xA;
               Category: {category}{newline}&#xA;
               Severity: {severity}{newline}&#xA;
               Title:{title}{newline}&#xA;
               Machine: {localMachine}{newline})}"
               name="Text Formatter" />
        </formatters>    
        <categorySources>
          <add switchValue="Error" name="General">
            <listeners>
              <add name="Rolling Flat File Trace Listener" />
            </listeners>
          </add>
        </categorySources>
        <specialSources>
          <allEvents switchValue="Error" name="All Events" />
          <notProcessed switchValue="All" name="Unprocessed Category" />
          <errors switchValue="Error" name="Logging Errors &amp; Warnings">
            <listeners>
              <add name="Rolling Flat File Trace Listener" />
            </listeners>
          </errors>
        </specialSources>
      </loggingConfiguration>
      <exceptionHandling>
        <exceptionPolicies>
          <add name="Policy">
            <exceptionTypes>
              <add name="All Exceptions" type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" postHandlingAction="NotifyRethrow">
                <exceptionHandlers>
                  <add name="Logging Exception Handler" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" logCategory="General" eventId="100" severity="Error" title="Jeejix Exception Handling" formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling" priority="0" />
                </exceptionHandlers>
              </add>
            </exceptionTypes>
          </add>
        </exceptionPolicies>
      </exceptionHandling>

    I want to remove stack trace , Additional Info, <auto-generated> from log file , which is not required

    do something need full

    Thanks





    Tuesday, September 28, 2010 9:22 AM

Answers

  • User-1728215479 posted

    Try

    <trace enabled="false" />

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, September 29, 2010 12:09 AM

All replies

  • User-1728215479 posted

    Try

    <trace enabled="false" />

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, September 29, 2010 12:09 AM
  • User-281539432 posted

    Can you please suggest if  I want remove only Additional Info:

     

    How I can add custom massage in the system generated massage ?

    Saturday, October 30, 2010 9:09 AM