[logback-user] How to avoid modifying logback.xml in different environments?
Ralph Goers
rgoers at apache.org
Tue Aug 25 07:45:05 CEST 2009
See Variable substitution
Ralph
On Aug 24, 2009, at 10:38 PM, hezjing wrote:
> Hi
>
> My logback.xml contains the following RollingFileAppender
> configuration:
>
> <appender name="FILE"
> class="ch.qos.logback.core.rolling.RollingFileAppender">
> <File>/usr/share/tomcat5/logs/Dummy.log</File>
> <RollingPolicy
> class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
> <FileNamePattern>Dummy.%d.log</FileNamePattern>
> <MaxHistory>120</MaxHistory>
> </RollingPolicy>
> <layout class="ch.qos.logback.classic.PatternLayout">
> <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</
> Pattern>
> </layout>
> </appender>
>
>
> 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!
>
>
> --
>
> Hez
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20090824/3b054f40/attachment.htm>
More information about the Logback-user
mailing list