You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by DECAFFMEYER MATHIEU <MA...@fortis.lu> on 2007/02/26 15:22:57 UTC

Two applications - one log file

Hi,

I have two applications (running in the same JVM) and I want to have
their logs stored in the same log file.
I have one log4j config file for each app.
Is this possible to do ?

Thank u.
__________________________________
   Mathieu Decaffmeyer



============================================
Internet communications are not secure and therefore Fortis Banque Luxembourg S.A. does not accept legal responsibility for the contents of this message. The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Nothing in the message is capable or intended to create any legally binding obligations on either party and it is not intended to provide legal advice.
============================================


Re: Two applications - one log file

Posted by Jacob Kjome <ho...@visi.com>.
Sure.  You can either point at the same log file and use separate logger
repositories or use the same logger repository.  Both cases require that you
run under the same JVM.  The former case allows you to use two separate config
files.  The latter case would share a configuration between the applications
and require a repository selector.

Jake

Quoting DECAFFMEYER MATHIEU <MA...@fortis.lu>:

> Hi,
>
> I have two applications (running in the same JVM) and I want to have
> their logs stored in the same log file.
> I have one log4j config file for each app.
> Is this possible to do ?
>
> Thank u.
> __________________________________
>    Mathieu Decaffmeyer
>
>
>
> ============================================
> Internet communications are not secure and therefore Fortis Banque Luxembourg
> S.A. does not accept legal responsibility for the contents of this message.
> The information contained in this e-mail is confidential and may be legally
> privileged. It is intended solely for the addressee. If you are not the
> intended recipient, any disclosure, copying, distribution or any action taken
> or omitted to be taken in reliance on it, is prohibited and may be unlawful.
> Nothing in the message is capable or intended to create any legally binding
> obligations on either party and it is not intended to provide legal advice.
> ============================================
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Two applications - one log file

Posted by Maarten Bosteels <mb...@gmail.com>.
I guess it depends on the classloader used by these two apps.

For example: I have several webapps running inside tomcat (same vm) and they
use different log4j configs.
(from their respective WEB-INF/classes/log4j.properties)

You could make then use the same log4j config and thus the same appenders
etc by
placing your log4j config file in tomcat/common/classes/ instead.
(then log4j will be configured by a classloader that is shared by all
webapps)

Please correct me if I am wrong.

Maarten

On 2/26/07, Martinez, Roque <RO...@saic.com> wrote:
>
> Use the same log name should work as long as they are in the same jvm...
>
>
>
>
>
>
>
> ________________________________
>
> From: log4j-user-return-19859-ROQUE.MARTINEZ=saic.com@logging.apache.org
> [mailto:log4j-user-return-19859-ROQUE.MARTINEZ=saic.com@logging.apache.o
> rg] On Behalf Of DECAFFMEYER MATHIEU
> Sent: Monday, February 26, 2007 9:23 AM
> To: log4j-user@logging.apache.org
> Subject: Two applications - one log file
>
>
>
> Hi,
>
> I have two applications (running in the same JVM) and I want to have
> their logs stored in the same log file.
> I have one log4j config file for each app.
> Is this possible to do ?
>
> Thank u.
> __________________________________
>    Mathieu Decaffmeyer
>
>
>
> ============================================
> Internet communications are not secure and therefore Fortis Banque
> Luxembourg S.A. does not accept legal responsibility for the contents of
> this message. The information contained in this e-mail is confidential
> and may be legally privileged. It is intended solely for the addressee.
> If you are not the intended recipient, any disclosure, copying,
> distribution or any action taken or omitted to be taken in reliance on
> it, is prohibited and may be unlawful. Nothing in the message is capable
> or intended to create any legally binding obligations on either party
> and it is not intended to provide legal advice.
> ============================================
>
>

RE: Two applications - one log file

Posted by "Martinez, Roque" <RO...@saic.com>.
Use the same log name should work as long as they are in the same jvm...

 

 

 

________________________________

From: log4j-user-return-19859-ROQUE.MARTINEZ=saic.com@logging.apache.org
[mailto:log4j-user-return-19859-ROQUE.MARTINEZ=saic.com@logging.apache.o
rg] On Behalf Of DECAFFMEYER MATHIEU
Sent: Monday, February 26, 2007 9:23 AM
To: log4j-user@logging.apache.org
Subject: Two applications - one log file

 

Hi, 

I have two applications (running in the same JVM) and I want to have
their logs stored in the same log file. 
I have one log4j config file for each app. 
Is this possible to do ? 

Thank u. 
__________________________________ 
   Mathieu Decaffmeyer 



============================================
Internet communications are not secure and therefore Fortis Banque
Luxembourg S.A. does not accept legal responsibility for the contents of
this message. The information contained in this e-mail is confidential
and may be legally privileged. It is intended solely for the addressee.
If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited and may be unlawful. Nothing in the message is capable
or intended to create any legally binding obligations on either party
and it is not intended to provide legal advice.
============================================