我已将 NHibernate 配置为将它生成的 SQL 输出到控制台。我已将以下内容添加到包含我想从 NUnit 运行的集成测试的 DLL 的 app.config 中:
<configSections>
<section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<nhibernate>
<add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
<add key="hibernate.show_sql" value="true" />
</nhibernate>
但是,SQL 仍然没有输出到 Console.Out。谁能想到我可能需要设置的另一个设置来查看我的 NHibernate 查询产生的 SQL?