Scan repository properties in PropertyPatternConverter
------------------------------------------------------

                 Key: LOG4NET-325
                 URL: https://issues.apache.org/jira/browse/LOG4NET-325
             Project: Log4net
          Issue Type: Improvement
          Components: Core
    Affects Versions: 1.2.12
            Reporter: Michal Sznajder


With https://issues.apache.org/jira/browse/LOG4NET-53 log4net got possibility 
to configure properties from config file.

It would be nice to see that PropertyPatternConverter supports this 
improvement. This would simplify configuring 
multiple FileAppenders by only once specifying where log should be stored, eg.:


<?xml version="1.0" encoding="utf-8" ?>
<log4net>
    <property>   
        <key value="ROOT_LOG_DIR" />
        <value value="c:\logs" />
    </property>

  <appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
    <file type="log4net.Util.PatternString" 
value="%property{ROOT_LOG_DIR}\logs.txt" />
  </appender>

  <appender name="RollingFile2" type="log4net.Appender.RollingFileAppender">
    <file type="log4net.Util.PatternString" 
value="%property{ROOT_LOG_DIR}\logs2.txt" />
  </appender>

  <root>
    <level value="ALL" />
    <appender-ref ref="RollingFile" />
    <appender-ref ref="RollingFile2" />
  </root>
</log4net>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to