Been bit a couple times by InternalLogger, how to capture?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Been bit a couple times by InternalLogger, how to capture?

pkellner
I've had a couple times where I had problem with my database and the only way I found it was to single step through Nlog.Targets.DatabaseTarget lines

 int result = command.ExecuteNonQuery();
InternalLogger.Trace("Finished execution, result = {0}", result);

and then actually read the caught exception.

I'm thinking I'd like to send those kind of errors to a text file someplace rather than having them absorbed (obviously I can't log them in the database).

Any suggestions on how to do this?

Thanks,

BTW, nice job on NLog!!!  Makes log4net seem anemic.

Peter Kellner
http://peterkellner.net