开发者

Where is the SQL outputting when setting show_sql in NHibernate?

W开发者_如何学运维here is the SQL outputting when setting show_sql in NHibernate?

I have ReSharper as well.


I believe it is outputted to the console.

But if you setup the log4net then you can get a logfile of everything that NHibernate does.

I do this programmatically and have a config file that specifies whether to do this or not. I found it better than setting in the hibernate configuration file

Update

I just had a look at the source code and their is a function called LogSqlInConsole() (Cfg.Loquacious.DbIntegrationConfiguration).

This is called from the Cfg.Loquacious.SettingsFactory which then says log.Info("echoing all SQL to stdout")

This is the log4net logger and I believe if you don't setup any configuration file it defaults to the console.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜