Logging Application block in Enterprise Library

Topics: Logging Application Block
Nov 25, 2009 at 5:28 AM

Is there a way to cancel sending email while processing other tracelisteners, during the run time?

Nov 25, 2009 at 6:52 AM

You mean disable processing for the email tracelistener?  There is no direct way to do this, the only way I could think of is for you to create a custom email tracelistener that has a certain flag that tells it if it should process logs or not.  That flag could be set outside the tracelistener, some global storage or something.  It's not nice but that's what I can think of right now.

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com

Nov 25, 2009 at 9:03 AM

Thank you. Can you help me on creating a custom email tracelistener and how can i use it for configuration file?

 

Nov 25, 2009 at 9:37 AM

Have you gone through over the documentation for creating a custom trace listener? - http://msdn.microsoft.com/en-us/library/dd139989.aspx.  You can use your custom tracelistener by right clicking on the Trace Listeners node in the Logging Configuration section, select Custom Trace Listener, and then browse for the location of the assembly where you place your custom trace listener.

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com