Where is the SQL outputting when setting show_sql in NHibernate?
I have ReSharper as well.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.