Redirect SQL Trace to Log

Posts   
 
    
Seth avatar
Seth
User
Posts: 204
Joined: 25-Mar-2006
# Posted on: 11-Mar-2010 19:51:55   

Is there a way to redirect the sql statements generated to a different logging system? We currently use NLog.

Thanks!

---- EDIT ---- I meant the trace statements as described in the "Generated code - Troubleshooting and debugging" section of the help.

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 11-Mar-2010 21:09:24   

You would need to build your own TraceListener to catch the trace statements and rewrite them to NLog. See http://www.15seconds.com/Issue/020910.htm for lots of information about tracing.

Matt

Seth avatar
Seth
User
Posts: 204
Joined: 25-Mar-2006
# Posted on: 12-Mar-2010 20:08:04   

Thanks. Works great.