I've gotten the Console thing to work with:
<add key="show_sql" value="true" >
However, this doesn't work within a webapp. I've also seen some
examples using log4net to log queries to a text file. Last I tried,
this wouldn't work for me but I guess what I'm asking is how exactly
does log4net do this? I assume NHibernate must call some delegate
every time it fires off a SQL query, and log4net attaches to this.
I'd like to write my own "mini-log4net" that just dumps the SQL to the
Debug stream. How can I do this?
Mike
On Mon, Jan 4, 2010 at 4:03 PM, Ricardo Lopes <[email protected]> wrote:
> You can enable NHibernate logging to the console or to a file
>
> 2010/1/4 Mike Christensen <[email protected]>:
>> 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.
>>
>>
>>
>
>
>
> --
>
> Ricardo Lopes
>
> --
>
> 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.