David,

You could loop through all the Appenders, looking for the one with your 
specific name, and then change the appropriate property at runtime.

I found really useful code for looping through & finding Appenders from Andrew 
Andrew Elmhorst and Nicko Cadell, posted here:  
http://www.l4ndash.com/Log4NetMailArchive%2Ftabid%2F70%2Fforumid%2F1%2Fpostid%2F15439%2Fview%2Ftopic%2FDefault.aspx

I had to tweak it a bit more for BufferingForwarding Appenders - but if your 
Appenders are hung off the root and are just rollingfile Appenders or something 
else with no indirection, you can probably use the simplest sample code.

If you need more help feel free to repost.

Richard J. Pennenga
Software Developer

Angel Medical Systems, Inc.
T:  732-542-5551 x110
F:  732-542-5560
rpenne...@angel-med.com
www.angel-med.com   [cid:image001.jpg@01CC998A.50776400] 
<http://twitter.com/AngelMedSystems>    [cid:image002.jpg@01CC998A.50776400] 
<http://www.youtube.com/AngelMedicalSystems>    
[cid:image003.jpg@01CC998A.50776400] 
<http://www.facebook.com/home.php?#/pages/Shrewsbury-NJ/Angel-Medical-Systems/78938919935?ref=ts>
    [cid:image004.jpg@01CC998A.50776400] 
<http://www.linkedin.com/companies/88422?trk=ape_s000001e_1000>

<<inline: image001.jpg>>

<<inline: image002.jpg>>

<<inline: image003.jpg>>

<<inline: image004.jpg>>

  • log4net advice Herrmann, David G
    • RE: log4net advice Richard Pennenga

Reply via email to