<log4net>
  <appender name="file" type="log4net.Appender.FileAppender">
 
    <file value="log4net.log" />
 
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date [%thread] %-5level %logger %ndc - %message%newline" />
    </layout>
  </appender>
 
  <appender name="console" type="log4net.Appender.ColoredConsoleAppender">
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
    </layout>
  </appender>
 
  <root>
    <level value="DEBUG" />
    <appender-ref ref="file" />
    <appender-ref ref="console" />
  </root>
 
</log4net>