Hi,
I suspect using log4net is probably the easiest way.
Add a reference to log4net, and a line to your startup-code that says:
Code:
log4net.Config.XmlConfigurator.Configure();
... then add something like this to your .config file:
Code:
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
...
</configSections>
<log4net>
<appender name="MyNhLog" type="log4net.Appender.RollingFileAppender">
<param name="File" value="c:\MyNhLog.log"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%d level %message%newline" />
</layout>
</appender>
<logger name="NHibernate">
<level value="INFO" />
<appender-ref ref="MyNhLog"/>
</logger>
</log4net>
...
</configuration>
... and that's all you should need.
Regards,
Richard