NHibernate has a built-in mechanism to log all SQL statements generated. It has a configuration parameter “show_sql” which should be set to true. NHibernate will throw all statements to Console.out if this is true. So a console application can easily display all statements but what about the web application?
An easy way is to use the NUnit console which has a separate tab for all Console.out output. If you do not use NUnit work out with log4net.