title: Fluent NHibernate and log4net
body: <p>Although there are lots of questions and answer on this topic, I wasn't able to find an answer to my problem. I've configured log4net for NHibernate as described here: <a href="http://nhibernate.hibernatingrhinos.com/19/how-to-configure-log4net-for-use-with-nhibernate" rel="nofollow">http://nhibernate.hibernatingrhinos.com/19/how-to-configure-log4net-for-use-with-nhibernate</a></p>
  
  <p>The only difference being I configured log4net for use with a trace appender:</p>
  
  <pre><code>&lt;appender name="trace" type="log4net.Appender.TraceAppender, log4net"&gt;
      &lt;layout type="log4net.Layout.PatternLayout,log4net"&gt;
          &lt;param name="ConversionPattern" value="%d %p %m%n" /&gt;
      &lt;/layout&gt;
  &lt;/appender&gt;
  ....
      &lt;logger name="NHibernate" additivity="false"&gt;
          &lt;level value="ALL"/&gt;
          &lt;appender-ref ref="trace"/&gt;
      &lt;/logger&gt;
      &lt;logger name="NHibernate.SQL" additivity="false"&gt;
          &lt;level value="ALL"/&gt;
          &lt;appender-ref ref="trace"/&gt;
      &lt;/logger&gt;
  </code></pre>
  
  <p>And presto, I get my NHibernate logging. However, I don't see any of the generated SQL queries, which is what I was hoping to see. I do get logging about opening and closing of sessions, commiting transactions etc. But nothing on the queries send to the database. Does anyone know what I'm overlooking?</p>
  
  <p>I'm using Fluent NHibernate 1.2 which uses NHibernate 3.1. I've enabled <code>ShowSql()</code> in the configuration.</p>