I'm running unit tests from inside VS2008 against a nHibernate application and would like to turn on logging during the unit tests so I can see a bit more of what is going on. I've copied and pasted another application's app.config that successfully logs nhibernate information into the unit tests app.config, but still don't get any output.
Here is my app.config for the testing project:
<log4net>
<appender name="GeneralLog" type="log4net.Appender.RollingFileAppender">
<file value="Logs/general.txt" />
<appendToFile value="true" />
<maximumFileSize value="100KB" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="5" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%d{HH:mm:ss.fff} [%t] %-5p %c - %m%n" />
</layout>
</appender>
<appender name="DataLog" type="log4net.Appender.RollingFileAppender">
<file value="Logs/data.txt" />
<appendToFile value="true" />
<maximumFileSize value="100KB" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="5" />
<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="DEBUG"/>
<appender-ref ref="GeneralLog" />
</root>
<logger name="NHibernate" additivity="false">
<level value="DEBUG"/>
<appender-ref ref="NHibernateFileLog"/>
</logger>
<logger name="Pushable.Data" additivity="false">
<level value="DEBUG"/>
<appender-ref ref="DataLog"/>
</logger>
</log4net>
When I run the test project, no output is created anywhere from log4net. Does the application that log4net runs under have to be a web or windows and not a testing application?