logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Extending support for ${foo} notation
Date Thu, 06 Oct 2005 02:51:52 GMT
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

Mime
View raw message