<?xml version="1.0" encoding="utf-8" ?>
<log4net>
  <!--
  (fonte:)
  The "importance" of the log statement can be set by using the appropriate 
  methods: debug<info<warn<error<fatal "debug" should be used for debug 
  statements, "info" for general information logged by the application, "warn" 
  for warning of problematic conditions, "error" when a recoverable error and 
  "fatal" when a non-recoverable error occured. In the log-configuration this 
  level can be configured for output of individual components: e.g., you could 
  define that the "main" application should log everything up to "info" level, 
  Springframework only up to "warn" and Hibernate only "error" statements. 
  Log4J can be configured (without changing the code) to filter these messages, 
  store them in a database, output them on a console or even send you a mail 
  if certain errors arise - and all of that quite fast.
  
  debug<info<warn<error<fatal
  -"debug" should be used for debug statements
  -"info" for general information logged by the application
  -"warn" for warning of problematic conditions
  -"error" when a recoverable error
  -"fatal" when a non-recoverable error occured
  -->

  <!-- Define some output appenders -->
  <appender name="trace"
        type="log4net.Appender.TraceAppender, log4net">
    <layout type="log4net.Layout.PatternLayout, log4net">
      <param name="ConversionPattern"
           value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n" />
    </layout>
  </appender>

  <appender name="console"
        type="log4net.Appender.ConsoleAppender, log4net">
    <layout type="log4net.Layout.PatternLayout, log4net">
      <param name="ConversionPattern"
           value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n" />
    </layout>
  </appender>

  <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
    <file value="logs\logfile.log.txt" />
    <appendToFile value="true" />
    <rollingStyle value="Composite" />
    <datePattern value="yyyyMMdd" />
    <maxSizeRollBackups value="10" />
    <maximumFileSize value="5MB" />
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%d{dd/MM/yyyy HH:mm:ss,SSS} [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
    </layout>
  </appender>
  <!-- Setup the root category, add the appenders and set the default priority -->

  <root>
    <priority value="TRACE" />
    <appender-ref ref="console" />
    <appender-ref ref="trace" />
    <!--this appender fails to release file after 'host.Dispose'-->
    <!--<appender-ref ref="RollingLogFileAppender" />-->
  </root>
  
  <!--Use it to view injection activite at obtain evidence of injection. If injection ocurre, there is only one instaciation-->
  <logger name="Spring.Web.Conversation">
    <priority value="TRACE" />
  </logger>
</log4net>