Two applications - one log file

2007-02-26 Thread DECAFFMEYER MATHIEU
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Two applications - one log file

2007-02-26 Thread Martinez, Roque
Use the same log name should work as long as they are in the same jvm...

 

 

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
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

2007-02-26 Thread Maarten Bosteels

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 <[EMAIL PROTECTED]> wrote:


Use the same log name should work as long as they are in the same jvm...









From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
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.





tutorial about log4j

2007-02-26 Thread Sebastian Hennebrueder
Hello,
I just finished a tutorial using the current log4j version and would
like to invite you to add the tutorial to your list. It provides basic
examples, compares property and xml configuration, gives detailled
pointers to the API documentation, some infos on best practices and an
example on how to change configuration dynamically in Tomcat application
server.

http://www.laliluna.de/log4j-tutorial.html

-- Best Regards / Viele Grüße

Sebastian Hennebrueder


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Multiple logging files

2007-02-26 Thread DECAFFMEYER MATHIEU

Hi,

I have a main log file where all the logs are stored of the application.
But I have a block of instructions in my application and I want the logs
of this code to be stored in another log file.

So I execute this : 

PropertyConfigurator.configure(...);

It works ok, but the logs are now stored in both file :
the file I specified in the configure method above
the main log file

Can anyone help ?

Thank u.
__

   Matt




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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: tutorial about log4j

2007-02-26 Thread James Stauffer

Please add it to the wiki.
http://wiki.apache.org/logging-log4j/Log4JProjectPages

On 2/26/07, Sebastian Hennebrueder <[EMAIL PROTECTED]> wrote:

Hello,
I just finished a tutorial using the current log4j version and would
like to invite you to add the tutorial to your list. It provides basic
examples, compares property and xml configuration, gives detailled
pointers to the API documentation, some infos on best practices and an
example on how to change configuration dynamically in Tomcat application
server.

http://www.laliluna.de/log4j-tutorial.html

-- Best Regards / Viele Grüße

Sebastian Hennebrueder


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
James Staufferhttp://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SMTPAppender ignoring Threshold

2007-02-26 Thread Eric Jain
Even after setting the Threshold to WARN (see below), I still get only 
ERROR messages; any idea what I'm doing wrong?






http://jakarta.apache.org/log4j/";>

  


  

  

  







  

  

  

  

  



  




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: SMTPAppender ignoring Threshold

2007-02-26 Thread Martinez, Roque
Eric;

This happened to me once before, A co-worker inadvertently changed the
level in his code. You may want to search for something similar.

R 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
rg] On Behalf Of Eric Jain
Sent: Monday, February 26, 2007 2:03 PM
To: log4j-user@logging.apache.org
Subject: SMTPAppender ignoring Threshold

Even after setting the Threshold to WARN (see below), I still get only 
ERROR messages; any idea what I'm doing wrong?





http://jakarta.apache.org/log4j/";>

   
 
 
   
 
   

   
 
 
 
 
 
 
 
   
 
   

   
 
   

   
 
 
 
   




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Two applications - one log file

2007-02-26 Thread Jacob Kjome

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 <[EMAIL PROTECTED]>:

> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple logging files

2007-02-26 Thread Jacob Kjome

Loggers inherit appenders unless they are told not to.  If you add an appender
to a logger and you want all logging for that logger to go only to the appender
you just added to it, you'll have to set additivity="false" to this logger.

log4j.additivity.com.mycompany.MyClass=false
OR





Jake

Quoting DECAFFMEYER MATHIEU <[EMAIL PROTECTED]>:

>
> Hi,
>
> I have a main log file where all the logs are stored of the application.
> But I have a block of instructions in my application and I want the logs
> of this code to be stored in another log file.
>
> So I execute this :
>
> PropertyConfigurator.configure(...);
>
> It works ok, but the logs are now stored in both file :
> the file I specified in the configure method above
> the main log file
>
> Can anyone help ?
>
> Thank u.
> __
>
>Matt
>
>
>
> 
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SMTPAppender ignoring Threshold

2007-02-26 Thread Eric Jain

Martinez, Roque wrote:

This happened to me once before, A co-worker inadvertently changed the
level in his code. You may want to search for something similar.


After some more research, I realize that I misunderstood the Threshold 
parameter: I thought that setting BufferSize to 1 and Threshold to WARN 
would send me any such messages as soon as it is logged; in fact the 
threshold for triggering messages remains unchanged at ERROR unless you 
implement your own TriggeringEventEvaluator. The Threshold parameter merely 
specifies what messages will be included in the email (so this parameter is 
mainly of interest if you set BufferSize to a value greater than 1).



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]