As long as there is a 'core' log4j jar having only jdk 1.2 dependencies, any number of optional jars could be produced to satisfy all deployment requirements.

e.g.

log4j.jar  (core + ext = current API for compatibility)
log4j-core.jar  (core classes)
log4j-ext.jar  (all optional packages)
log4j-smtp.jar  (optional)
log4j-jms.jar  (optional)
log4j-db.jar  (optional)
log4j-oro.jar  (optional)
log4j-...

Regards

Andy

On Tue, 18 Jan 2005 15:00:19 -0800
 Mark Womack <[EMAIL PROTECTED]> wrote:
Could we break it up into 2 jars, log4j-core.jar and log4j-ext.jar, instead
of a multitude of api specific jars? Does this get in the way of what you
are trying to accomplish?


-Mark

-----Original Message-----
From: Ceki G�lc� [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 13, 2005 9:09 AM
To: [email protected]
Subject: [POLL] Splitting log4j.jar by dependency


Hello all,

While performing some tests with Tomcat, I noticed that if log4j.jar
is placed in ./common/lib/, then for example an instance of
SMTAppender cannot be created without placing 'mail.jar' also in
./common/lib/, placing 'mail.jar' in WEB-INF/lib is not enough.


To circumvent this problem, I propose to split log4j.jar by
dependency. For example,


log4j.jar (core classes depending only on JDK 1.2)
log4j-smtp.jar
log4j-jms.jar
log4j-db.jar
log4j-oro.jar
log4j-...

This way, the user wishing to use SMTPAppender in her application can
place log4j-smtp.jar and mail.jar in her application's WEB-INF/lib
directory without the need to add any new jar files in ./common/lib.


Apache Ant has adopted the same approach for similar reasons [1, 2].

[1] http://marc.theaimsgroup.com/?l=ant-dev&m=102689870118435&w=2
[2] http://ant.apache.org/faq.html#delegating-classloader


What do you think?


-- Ceki G�lc�

   The complete log4j manual: http://www.qos.ch/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]



The information contained in this e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If You are not the intended recipient of this e-mail, the use of this information or any disclosure, copying or distribution is Prohibited and may be unlawful. If you received this in error, please contact the sender and delete the material from any computer. The views expressed in this e-mail may not necessarily be the views of The PCMS Group plc and should not be taken as authority to carry out any instruction contained.


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



Reply via email to