Note that there are some explanatory texts on larger screens.

plurals
  1. POLogging On/Off in EntLib
    primarykey
    data
    text
    <p>is there a setting in the config file that can turn the logging on or off in EntLib. There are posts showing how to do this programatically but I am interested in doing it through the config file.</p> <p>I am using EntLib 5.</p> <p>here is the config</p> <pre><code> &lt;loggingConfiguration name="" tracingEnabled="true" defaultCategory="General"&gt; &lt;listeners&gt; &lt;add name="Event Log Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" source="Enterprise Library Logging" formatter="Text Formatter" log="" machineName="." traceOutputOptions="None" /&gt; &lt;add name="Flat File Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" fileName="c:\\Log\\wclog.log" header="" formatter="Text Formatter" traceOutputOptions="DateTime, Timestamp" /&gt; &lt;/listeners&gt; &lt;formatters&gt; &lt;add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" template="Timestamp:{timestamp} Method: {title}, {category} {message}" name="Text Formatter" /&gt; &lt;/formatters&gt; &lt;categorySources&gt; &lt;add switchValue="All" name="General"&gt; &lt;listeners&gt; &lt;add name="Flat File Trace Listener" /&gt; &lt;/listeners&gt; &lt;/add&gt; &lt;/categorySources&gt; &lt;specialSources&gt; &lt;allEvents switchValue="All" name="All Events"&gt; &lt;listeners&gt; &lt;add name="Flat File Trace Listener" /&gt; &lt;/listeners&gt; &lt;/allEvents&gt; &lt;notProcessed switchValue="All" name="Unprocessed Category"&gt; &lt;listeners&gt; &lt;add name="Flat File Trace Listener" /&gt; &lt;/listeners&gt; &lt;/notProcessed&gt; &lt;errors switchValue="All" name="Logging Errors &amp;amp; Warnings"&gt; &lt;listeners&gt; &lt;add name="Flat File Trace Listener" /&gt; &lt;/listeners&gt; &lt;/errors&gt; &lt;/specialSources&gt; </code></pre> <p>Regards. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload