views:

316

answers:

2

I have a library assembly that outputs trace information, and a client winforms application that adds a trace listener via app.config. If I were to use the library in ASP.NET, not configured for System.Diagnostics tracing, how could I 'catch' the trace output?

Bonus question: Can I do something with Elmah to catch and log this info? Our ASP.NET app currently uses Elmah for error logging, but that's all I know on that side of things.

+1  A: 

I think that, as long as the library outputs trace information, this information could be captured with any specialized tool (like DebugView) or even a house grown tool, regardless of ASP.NET configuration.

Sorin Comanescu
I'm wanting to capture it without a specialised tool.
ProfK
A: 

write code for attaching a trace file listener programtically and enable tracing in web.config - you will be done after that

chutzpah