logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: disabling autoconfiguration
Date Mon, 15 Nov 2004 18:44:12 GMT

Hi,
Given the fact autoconfiguration runs in a static initializer, it only seems possible to circumvent
with a custom classloader.  It's a lot less effort to simply not have log4j.properties/log4j.xml
on the classpath than it is to start mucking with custom loaders for this purpose.

So no, I don't think it'd be useful to have such a custom loader included log4j.  The work/reward
ratio is far too high.  It's always the application deployer's responsibility to control the
classpath, including not only classes but also artifacts used as classloader resources.  Repackaging
3rd party jars to do this is one way, getting on the 3rd party's case to package their jars
in a more developer-friendly way is another, and both ways are better than the band-aid approach
you suggest IMHO.  

Yoav Shapira http://www.yoavshapira.com
 

>-----Original Message-----
>From: Ricardo Trindade [mailto:ricardo.trindade@emation.pt]
>Sent: Monday, November 15, 2004 1:38 PM
>To: Log4J Users List
>Subject: Re: disabling autoconfiguration
>
>But do you think it would be possible / usefull ?
>
>thanks
>Ricardo
>
>Ceki Gülcü wrote:
>
>> Auto-configuration occurs when the log4j classes are loaded into
>> memory. It is not dependent on any particular configurator.
>>
>>
>> At 05:07 PM 11/15/2004, Ricardo Trindade wrote:
>>
>>> Well, this could be simplistic, but perhaps :
>>>
>>> JoranConfigurator logConfigurator = new JoranConfigurator(); ->
>>> current behaviour
>>> JoranConfigurator logConfigurator = new JoranConfigurator( boolean
>>> autoinit ); -> user can specify if auto-init occurs
>>>
>>> thanks
>>> Ricardo
>>>
>>> Ceki Gülcü wrote:
>>>
>>>>
>>>> How do you suggest the automatic configuration feature be turned
>>>> off. More specifically, how do you think the user pass this
>>>> instruction to log4j?
>>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org




This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


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


Mime
View raw message