logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Grobmeier <grobme...@gmail.com>
Subject Re: [v2] Where to put appenders with dependency?
Date Thu, 06 Dec 2012 14:30:13 GMT
On Thu, Dec 6, 2012 at 3:21 PM, Gary Gregory <garydgregory@gmail.com> wrote:
> Hi All:
>
> Please do not make it more complicated than it already is. I profoundly
> dislike having to deal with projects that decide for me that I need to
> reference an API, core, foo and bar jar, and one more jar for this and
> another for that. I don't care, it's a hassle. Just give me an "all" jar
> file (like CXF and Jetty give you the option to use). If I have to dig
> around for yet another Spring jar, I'm going to smash a pumpkin. At
> run-time, if you do not load a class, the deps are not needed. At compile
> time, yes, you need the API deps, but Maven takes care of that for us.

If you make a webapp with the mongo-db appender in it, you have that
lib ready and waiting for you in the libs folder. Even if you don't
need it. That not the problem. But what if i want to use a different
version of mongodb-connector? Do I end up with 2 mongo-db connectors
in the lib folders? Which one is taken?

This case is often happening in log4j1 world, where people need to
write exclude statements for jars which are provided by the container.
While I like to keep things easy, I am not so sure we should put each
and every appender and depenencies into the project at compile time.

Maybe there is an option to make dependencies like mongodb-connector
"provided"- then it would not be delivered, the user would need to
take to create this dependency himself, if he wants to use the mongodb
appender.

Cheers



> Gary
>
>
> On Thu, Dec 6, 2012 at 9:09 AM, Christian Grobmeier <grobmeier@gmail.com>
> wrote:
>>
>> Hi,
>>
>> lets say we would write an SMTPAppender. It would need dependencies to
>> some mail framework. If you write an MongoDB Appender you wuold have
>> dependencies to the Mongo-Connector.
>>
>> Both dependencies should not come with log4j2 because most people
>> would not need them. Now my first idea was to create a new artifact
>> like:
>>
>> <groupId>org.apache.logging.log4j.extensions</groupId>
>> <artifactId>log4j-smtp</artifactId>
>>
>> They could inherit the log4j parent and put into the directory as
>> submodules.
>>
>> But I believe it might be beneficial to create a separate repository,
>> lets say log4j2-extensions and maintain them in some way like Apache
>> Commons or Apache Onami, as independent artifacts with independent
>> release cycle.
>>
>> If we would do that, we could have a Sandbox and a Proper folder.
>> Sandbox could be opened to every ASF committer. I imagine there are a
>> few people who might want to contribute their things. I know a few
>> people who maintain some log4j1 related stuff, like osgi-log4j in
>> Apache Sling or I think in Hadoop is something similar (log4j Hadoop
>> appender)
>>
>> Any thoughts?
>>
>> Cheers
>> Christian
>>
>> --
>> http://www.grobmeier.de
>> https://www.timeandbill.de
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> Spring Batch in Action: http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory



--
http://www.grobmeier.de
https://www.timeandbill.de

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


Mime
View raw message