The ${foo} notation searches the environment for a key and uses its
value. I wonder if it would be useful to introduce the idea of a local
environment that would allow locally scoped temporary environment
variables:
<log4net>
<localEnvironment name="LOG4NET_PATH" value="c:\logs\staging" />
<localEnvironment name="DEFAULT_LAYOUT" value="%message%newline" />
<appender name="FileAppender" type="log4net.Appender.FileAppender">
<file value="${LOG4NET_PATH}\log.txt" />
<layout
type="log4net.Layout.PatternLayout"
value="${DEFAULT_LAYOUT}" />
</appender>
If the item was not found in the local environment, System.Environment
would be searched.
Comments?
- Ron