You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by DWTebriel <dw...@gmail.com> on 2009/03/17 14:59:44 UTC

PatternString and ThreadContext

I'm currently trying to get log4net to dynamically add emails to an
SmtpAppender during runtime using the ThreadContext. I can set values
to the ThreadContext.Properties dictionary without a problem. I can
also refer to them in most instances through the appender. The values
will show up within the pattern layout section. However when I use a
PatternString on a to field for the SmtpAppender, the property field
isn't parsed correctly at all. This happens on both the ThreadContext
and GlobalContext. I threw together a small unit test to get a working
example going. Any ideas?