I'm working on a ASP.NET MVC application. In my solution, I have some projects:
- Domain - class library, my DAL. Reference NHibernation etc, but not log4net.
- WebUI - ASP.NET MVC project, references log4net. Does NOT reference NHibernate (hence the DAL project)
In my web.config, I have configured log4net this way:
<root>
<appender-ref ref="DebugAppender"/>
</root>
</log4net>
And this works. log4net does log - however, it logs everything. So I tried adding a log filter that only cares about the SQL:
<root>
<logger name="NHibernation.SQL additivity="false">
<appender-ref ref="DebugAppender"/>
<level value="DEBUG" />
</root>
I expect only SQL now, but nothing is logged at all. How come? I've also tried NHibernate.Loader.Loader with INFO, but with no luck.
For the sake of debugging, I've also tried to reference NHibernate to WebUI, but this didn't help either. Any suggestions?
Thanks.