none
Enterprise Library 6.0 Logging disable/enable dynamically RRS feed

  • Question

  • I have requirement to log the message in Log file and Event Viewer. But I want if I call one method then it should log the message in Log file not in Event Viewer at that time. And, if I call second method then it should log the message in Event Viewer not in Log file at the same time.

    Please advise if there is way to do this using Enterprise Library 6.0.

    Friday, March 4, 2016 4:38 AM

All replies

  • Hi Vikram,

    Based on your description, your case related to the Enterprise Library, like many patterns & practices deliverables, is associated with a community sitewww.codeplex.com/entlib
    Please post this issue and get support using the Enterprise Library Discussion forum.

    Thanks for your understanding.




    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, March 7, 2016 2:04 AM
  • Hi Vikram,

    you can modify settings at runtime. Setup the configuration in an external file and use a file configuration source in app/web.config. 

    You can also try creating a custom trace listener and then changing the attribute on runtime by following a similar guide here.

    You can access the attribute which stores your path by using Attribute["xxx"] (assuming the attribute in your config file's trace listener node has the path in an attribute named "xxx".)

    Hope that helps.


    Rami Sarieddine Technical Evangelist

    Tuesday, March 29, 2016 12:46 PM