You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Maarten Bosteels <mb...@gmail.com> on 2007/09/11 23:04:06 UTC
slf4j dependencies
Hello community,
On the trunk, most mina sub-projects have a dependency on slf4j-simple, with
scope = test
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.4.3</version>
<scope>test</scope>
</dependency>
But mina-example has a dependency on slf4j-log4j12 with scope=runtime.
When I generate IDEA projects files using mvn idea:idea
the mina-example module has two slf4j bindings in its classpath:
slf4j-log4j12 because it's in the pom.xml
slf4j-simple because the module depends on the mina-core module
As a consequence, when I am running examples from within IDEA,
it's unpredictable which binding will be used.
I haven't tried this in eclipse, but I suspect the problem will exist there
as well.
So I think we should use the same slf4j binding for all modules.
I would propose slf4j-log4j12 because it is of course far more flexible than
slf4j-simple.
Besides, I am writing a test-case for the MDCInjectionFilter that depends on
log4j.
Note this change doesn't affect the users of MINA at all: they can still use
the slf4j binding of their choice.
What do you guys think ?
(thanks for reading this far)
Maarten
Re: slf4j dependencies
Posted by Trustin Lee <tr...@gmail.com>.
On 9/12/07, Maarten Bosteels <mb...@gmail.com> wrote:
> Hello community,
>
> On the trunk, most mina sub-projects have a dependency on slf4j-simple, with
> scope = test
>
> <dependency>
> <groupId>org.slf4j</groupId>
> <artifactId>slf4j-simple</artifactId>
> <version>1.4.3</version>
> <scope>test</scope>
> </dependency>
>
> But mina-example has a dependency on slf4j-log4j12 with scope=runtime.
It's because it's an example. Example needs at least one binding at runtime.
> When I generate IDEA projects files using mvn idea:idea
> the mina-example module has two slf4j bindings in its classpath:
> slf4j-log4j12 because it's in the pom.xml
> slf4j-simple because the module depends on the mina-core module
>
> As a consequence, when I am running examples from within IDEA,
> it's unpredictable which binding will be used.
>
> I haven't tried this in eclipse, but I suspect the problem will exist there
> as well.
>
> So I think we should use the same slf4j binding for all modules.
> I would propose slf4j-log4j12 because it is of course far more flexible than
> slf4j-simple.
> Besides, I am writing a test-case for the MDCInjectionFilter that depends on
> log4j.
>
> Note this change doesn't affect the users of MINA at all: they can still use
> the slf4j binding of their choice.
>
> What do you guys think ?
You made a good point. Let's move on to slf4j-log4j12.
> (thanks for reading this far)
I wouldn't mind your post!
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6