Logging: Create response hook

Topics: Logging Application Block
Aug 31, 2007 at 3:26 PM
I have to need to send a response from a listener back to the caller for the write. What would be the best way to go about this?
Aug 31, 2007 at 4:41 PM
I simply can't figure out how to attach to the traceListener's logEventRaised event through LogWriter without hacking up a ton of code.
I can easily attach to LogWriter logEventRaised, but the traceListener uses a different instrumentation provider which the LogWriter never appears to look at.
Sep 3, 2007 at 3:02 PM
Hi Matthew,

The instrumentation events were not really designed for this use, and the logging block is supposed to be invisible for the application (i.e. its internal workings should not be exposed to the application).

What do you need to accomplish with this callback? There may be other solution that doesn't involve these events. Do you need to be notified for entries logged by a specific listener or by all?

Regards,
Fernando
Sep 4, 2007 at 1:08 PM
I need feedback from entries logged by a specific listener. I have a custom listener that writes to a db and I need to pass a value back up. I have decided the only way to do this is to pass a delegate in the extended properties. However, that is not ideal at all.