title: How to configure log4net to print to console in debug mode
body: <p>Is there a way to configure log4net to print logs both to console and to files during debug?</p>
  
  <p>I am trying to find a way to debug my software efficiently by observing the logs immediately when they happen.</p>
  
  <p>Writing to files is problematic for me for debugging because I don't want to wait until the file is flushed to the disk and then to open it.</p>
  
  <p>Therefore I prefer it to write into console.</p>
  
  <p>What do you suggest?</p>
  
  <p>I added the <code>app.config</code> file with the additional appended, but I am not being able to show result console.</p>
  
  <p>Following is my app.config configuration:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /&gt;
    &lt;/configSections&gt;
      &lt;system.serviceModel&gt;
          &lt;bindings&gt;
              &lt;wsHttpBinding&gt;
                  &lt;binding name="WSHttpBinding_IProviderService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"&gt;
                      &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/&gt;
                      &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/&gt;
                      &lt;security mode="Message"&gt;
                          &lt;transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/&gt;
                          &lt;message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/&gt;
                      &lt;/security&gt;
                  &lt;/binding&gt;
              &lt;/wsHttpBinding&gt;
          &lt;/bindings&gt;
          &lt;client&gt;
              &lt;endpoint address="http://localhost:8081/AP2" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IProviderService" contract="IProviderService" name="WSHttpBinding_IProviderService"&gt;
                  &lt;identity&gt;
                      &lt;dns value="localhost"/&gt;
                  &lt;/identity&gt;
              &lt;/endpoint&gt;
          &lt;/client&gt;
      &lt;/system.serviceModel&gt;
     &lt;log4net debug="true"&gt;
      &lt;appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"&gt;
        &lt;file value="C:\\Temp\\1.txt" /&gt;
        &lt;appendToFile value="true" /&gt;
        &lt;rollingStyle value="Size" /&gt;
        &lt;maxSizeRollBackups value="10" /&gt;
        &lt;maximumFileSize value="10MB" /&gt;
        &lt;staticLogFileName value="true" /&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n" /&gt;
        &lt;/layout&gt;
      &lt;/appender&gt;
      &lt;appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender"&gt;
        &lt;param name="Threshold" value="INFO" /&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;param name="ConversionPattern" value="%d [%t] %-5p %c [%x] - %m%n" /&gt;
        &lt;/layout&gt;
      &lt;/appender&gt;
      &lt;root&gt;
        &lt;level value="DEBUG" /&gt;
        &lt;appender-ref ref="RollingLogFileAppender" /&gt;
      &lt;/root&gt;
    &lt;/log4net&gt;
    &lt;startup&gt;
      &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt;
    &lt;/startup&gt;
  &lt;/configuration&gt;
  </code></pre>