logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: Multiples AS logging on the same logging file ( How use multiple logging files)
Date Mon, 08 Nov 2004 17:05:15 GMT

This question is related to log4j. It should have been posted to the 
log4j-user list.

Anyway, to answer your question, you can take advantage of log4j variable 
substitution functionality in configuration files. If you use log4j 1.3 (in 
alpha stage), then you can even fetch variables from JNDI.

At 04:44 PM 11/8/2004, you wrote:
>Hi log4j gurus,
>I have a cluster of 4 Application Servers running on the same phisical 
>server and logging to the same file.
>I want that each app server  that have the same app code installed log on 
>a different logging file but as the log4j.properties is the same for all 
>apps, we are logging on the same file.
>We are using RollingFileAppender as you can see and we have "hardcode" the 
>file´s name and location.
>    <appender name="rolling" class="org.apache.log4j.RollingFileAppender">
>         <param name="File" value="../../../../pgcd_intranet.log"/>
>         <param name="MaxFileSize" value="10MB"/>
>         <param name="MaxBackupIndex" value="7"/>
>         <layout class="org.apache.log4j.PatternLayout">
>             <param name="ConversionPattern" 
> value="%d{yy-MM-dd,HH:mm:ss,SSS} %-5p (%c{1}:%L) >> %m%n"/>
>         </layout>
>     </appender>
>1) How works log4j in this context ( 4 AS logging to the same file) I mean 
>"deadlock", "problems with sync", etc.
>2) How can I do to use one diferent logging file for each AS without 
>changing application code ?
>3) How can I do to use env variables inside log4j.properties?
>Thank in advance

Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"

View raw message