开发者

Where is the SQL outputting when setting show_sql in NHibernate?

开发者 https://www.devze.com 2022-12-13 03:51 出处:网络
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.

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

精彩评论

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