Yup, that's what I ended up doing. I use the DebugAppender class and now I can see all the NHibernate SQL calls in the Visual Studio output window. Very handy!
On Mon, Jan 4, 2010 at 9:46 PM, Ayende Rahien <[email protected]> wrote: > That is pretty much it. > A simple way to get some of what it does it to use log4net's debug appender > for NHibernate.SQL and use dbgviewer to look at it. > > On Tue, Jan 5, 2010 at 7:44 AM, Mike Christensen <[email protected]> wrote: >> >> Yup, I've used it before. It's great but insanely expensive for what >> it does. I'm curious as to how it works though, I assume it listens >> on some NHibernate event that gets fired whenever a SQL query is run. >> >> On Mon, Jan 4, 2010 at 9:42 PM, Ayende Rahien <[email protected]> wrote: >> > Mike, >> > Take a look at http://nhprof.com, it does exactly that. >> > >> > On Tue, Jan 5, 2010 at 1:56 AM, Mike Christensen <[email protected]> >> > wrote: >> >> >> >> This should be a simple question, but what's the best and easiest way >> >> to get a view of all SQL queries being run? I was able to turn on a >> >> debug mode that would write queries to Console, but this no longer >> >> works when you're writing a web app. If I could just Debug.WriteLine >> >> each query that would be awesome. Is there like an event I can attach >> >> to or something? Thanks! >> >> >> >> Mike >> >> >> >> -- >> >> >> >> You received this message because you are subscribed to the Google >> >> Groups >> >> "Castle Project Users" group. >> >> To post to this group, send email to >> >> [email protected]. >> >> To unsubscribe from this group, send email to >> >> [email protected]. >> >> For more options, visit this group at >> >> http://groups.google.com/group/castle-project-users?hl=en. >> >> >> >> >> > >> > -- >> > >> > You received this message because you are subscribed to the Google >> > Groups >> > "Castle Project Users" group. >> > To post to this group, send email to >> > [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > For more options, visit this group at >> > http://groups.google.com/group/castle-project-users?hl=en. >> > >> >> -- >> >> You received this message because you are subscribed to the Google Groups >> "Castle Project Users" group. >> To post to this group, send email to >> [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/castle-project-users?hl=en. >> >> > > -- > > You received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
