<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">See&nbsp;<a href="http://logback.qos.ch/manual/joran.html%23variableSubstitution">Variable substitution</a><div><br></div><div>Ralph</div><div><br></div><div><a href="http://logback.qos.ch/manual/joran.html%23variableSubstitution"></a>On Aug 24, 2009, at 10:38 PM, hezjing wrote:<div><br class="Apple-interchange-newline"><blockquote type="cite">Hi<div><br></div><div>My logback.xml contains the following RollingFileAppender configuration:</div><div><br><div><div>&lt;appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;</div> <div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;File&gt;/usr/share/tomcat5/logs/Dummy.log&lt;/File&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;RollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;</div> <div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;FileNamePattern&gt;Dummy.%d.log&lt;/FileNamePattern&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;MaxHistory&gt;120&lt;/MaxHistory&gt;</div> <div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;/RollingPolicy&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;layout class="ch.qos.logback.classic.PatternLayout"&gt;</div> <div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;Pattern&gt;%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n&lt;/Pattern&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;/layout&gt;</div> <div>&lt;/appender&gt;</div><div><br></div><div><br></div><div>The log file is created in&nbsp;/usr/share/tomcat5/logs, which is on the production Unix server.</div><div><br></div><div>The problem is my development environment is on Windows, and Tomcat in a different directory,</div> <div>so I have to modify the directory every time before I deployed the application to the production server.</div><div><br></div><div><br></div><div>Is there a convenient way that I don't have to modify logback.xml, and share the same logback.xml in different environments?</div> <div><br></div><div><br></div><div>Thank you!</div><div><br></div></div><div><br></div>-- <br><br>Hez<br> </div> _______________________________________________<br>Logback-user mailing list<br><a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br>http://qos.ch/mailman/listinfo/logback-user<br></blockquote></div><br></div></body></html>