logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sola Garrido Hector Jose (SFC)" <so...@telefonica.com.ar>
Subject RE: Multiples AS logging on the same logging file ( How use multi ple logging files)
Date Thu, 11 Nov 2004 15:20:26 GMT
Ceki,

How can I do to get documentation about log4j 1.3 (in 
alpha stage) to use variable sustitution with JNDI

Thank in advance

-----Original Message-----
From: Ceki Gülcü [mailto:ceki@qos.ch]
Sent: Monday, November 08, 2004 2:05 PM
To: Logging General
Subject: Re: Multiples AS logging on the same logging file ( How use
multiple logging files)



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>
>
>Questions:
>
>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
>
>Hector

-- 
Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      http://www.qos.ch/shop/products/eclm/  


Mime
View raw message