title: log4net how best can I select just some logging in a class?
body: <p>log4net does great on turning log levels on/off on a per class basis. But I have a case where I am implementing an interface and I have a ton of logging in this implementation. It's a 3rd party interface so I'm stuck having all this code, and hence all this logging, in a single class.</p>
  <p>I've looked at creating helper classes for each of the areas of this implementation. But that actually makes things more messy. Partial classes work great for this, but again - still all one class.</p>
  <p>Is there a good way to further specify which logging statements to log? The best I've come up with is an enum of the categories in the class and define each logging statement with the specific enum. And then use that enum in the if (log.IsDebugEnable &amp;&amp; MyEnum == true)</p>
  <p>Anything better?</p>
  <p><strong>Update:</strong> per the request below, actually showing all this would be so long/large that no one would read it. So here's a summation:</p>
  <pre><code>log.Debug(&quot;order placed&quot;);
  // ...
  log.Debug(&quot;new stock added&quot;);
  // ...
  log.Debug(&quot;price change&quot;);
  // ...
  log.Debug(&quot;order changed&quot;);
  // ...
  log.Debug(&quot;predicted price&quot;);
  // ...
  log.Debug(&quot;profit taken&quot;);
  // ... the types of actions go on and on
  </code></pre>
  <p>All of the above is implementing a QCAlgorithm in QuantConnect. Basically there are times I want the details for orders logged. Other times I don't want those but do need to log the predicted price and actual price logging.</p>