You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Asaf Lahav <as...@primagrid.com> on 2006/03/08 15:41:05 UTC

using multiple log4j.properties files

Hi all,

 

We are using common-logging and log4j in our product, and I was wondering
whether it's possible to use log4j when using multiple log4j.properties
files?

What I would like to achieve is the possibility to create several
configuration (log4j.properties) files and that each log4j 'log' instance
will be able to use the log4j.properties configuration file of its choice
(according to application logic of course).

How can I achieve that? Is it possible to do that with log4j?

 

Thanks in advance,

 

Asaf Lahav

VP R&D, Prima Grid LTD.

Cellular:  972-54-4717955

Phone:   972-3-6540255

Fax:       972-3-6540254



 


Re: using multiple log4j.properties files

Posted by Simon Kitching <sk...@apache.org>.
On Wed, 2006-03-08 at 16:41 +0200, Asaf Lahav wrote:
> Hi all,
> 
>  
> 
> We are using common-logging and log4j in our product, and I was
> wondering whether it's possible to use log4j when using multiple
> log4j.properties files?
> 
> What I would like to achieve is the possibility to create several
> configuration (log4j.properties) files and that each log4j 'log'
> instance will be able to use the log4j.properties configuration file
> of its choice (according to application logic of course).
> 
> How can I achieve that? Is it possible to do that with log4j?

Commons-logging doesn't have any control over what configuration files
log4j uses. Commons-logging binds to just *one* log4j installation, and
lets that log4j installation configure itself.

Commons-logging therefore cannot help you. You might want to follow up
on the log4j list to see if there's anything in log4j that could help
you.

I have to say I don't understand what it is you are trying to do; sounds
very odd to me. Normally the fact that a Log object can be created with
any arbitrary category name, and the (single) configuration file allows
different categories to be handled independently is enough. When you
post to the log4j list I suggest you try and describe your requirements
in more detail.

Regards,

Simon


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