[logback-user] How to avoid modifying logback.xml in different environments?

hezjing hezjing at gmail.com
Tue Aug 25 07:38:32 CEST 2009

My logback.xml contains the following RollingFileAppender configuration:

<appender name="FILE"
<RollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>

The log file is created in /usr/share/tomcat5/logs, which is on the
production Unix server.

The problem is my development environment is on Windows, and Tomcat in a
different directory,
so I have to modify the directory every time before I deployed the
application to the production server.

Is there a convenient way that I don't have to modify logback.xml, and share
the same logback.xml in different environments?

Thank you!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20090825/4433f52c/attachment.htm>

More information about the Logback-user mailing list