title: Log4Net: How to output the logging results inside the program into a variable?
body: <p>I am trying to learn using <strong>Log4Net</strong> to be able to improve my logging technique in my program.
  I have read the documents provided in the Log4Net website, however I have these questions in mind.</p>
  
  <p>This is the most simple output shown in the example program on the <strong>Log4Net</strong> website produced by <code>BasicConfigurator.Configure()</code>.</p>
  
  <pre><code>0    [main] INFO  MyApp        - Entering application.
  36   [main] DEBUG Com.Foo.Bar  - Did it again!
  51   [main] INFO  MyApp        - Exiting application.
  </code></pre>
  
  <p>My program already has a pane (in debug mode) to show the flow of the program which cycles through numerous asynchronous attempts. So when I run it I can see the flow of the program (typical mass debugging method).</p>
  
  <p>In this level, as far as I know by using Log4Net I can collect logs in those moments and these logs can be appended into so many different output methods such as <em>console</em>, <em>external file, db</em> and etc. <strong>This leads to double ups</strong> in the code. One line to output the logs to the UI and the other to log for Log4Net, in each test point.</p>
  
  <p><strong>Is there any method that I can output the contents of one of the appenders, such as the one shown above, to a variable of a type string or similar to be able to show it at runtime?</strong></p>
  
  <p><strike>I am not sure how you can see the output of the console in the WPF application</strike>. And it seems quite funny to output the <strong>Log4Net</strong> into a file and then print the contests of it back to a string.</p>
  
  <hr>
  
  <h2>Update</h2>
  
  <p>The output of the <code>Console Appender</code> can be seen in the <strong><em>Output</em></strong> window of <em>Visual Studio</em> when <em>Show output from:</em> drop-down is set to "Debug". Many thanks to @Aron for pointing it out.</p>