I am trying to make show_sql work in my ASP.NET application. However it is not working. I am using NHibernate 0.9.1. Here are the relevant sections of my Web.Config file:
Code:
<nhibernate>
<add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
<add key="hibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect" />
<add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
<add key="hibernate.connection.connection_string" value="server=localhost;database=TimeTracker;Integrated Security=SSPI;" />
<add key="hibernate.use_outer_join" value="true" />
<add key="hibernate.query.substitutions" value="dbo.File=dbo.[File]" />
<add key="hibernate.cache.provider_class" value="NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache" />
<add key="hibernate.show_sql" value="true" />
</nhibernate>
<log4net>
<appender name="ServicesLog" type="log4net.Appender.RollingFileAppender">
<file value="D:/Temp/TimeTrackerLogs/Services.log" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="1MB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%d{HH:mm:ss.fff} [%t] %-5p %c - %m%n" />
</layout>
</appender>
<!-- levels: DEBUG, INFO, WARN, ERROR, FATAL -->
<root>
<level value="WARN" />
<appender-ref ref="ServicesLog" />
</root>
</log4net>
Note that log4net debug level is set to WARN. I do not want DEBUG and INFO messages in the log. I only want SQL statements in there. How can I do that?