You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Alastair Maw <me...@almaw.com> on 2006/10/24 23:09:54 UTC
Commons logging is evil
Hi folks,
commons-logging is somewhat evil, with complex classloader machinations
that leak memory and resources if you're not careful. If you haven't
experienced commons-logging classloader hell, consider yourself lucky.
See the following:
http://radio.weblogs.com/0122027/2003/08/15.html
http://www.qos.ch/logging/classloader.jsp
http://jonasboner.com/?p=70
http://www.qos.ch/logging/thinkAgain.jsp
etc.
SLF4J provides a nice simple alternative, which people in other OS
projects have been migrating to in droves recently. I suggest we follow
them.
If we don't want to patch everything at once, there's a migration API:
http://www.slf4j.org/manual.html#gradual
Thoughts?
Best regards,
Al
Re: Commons logging is evil
Posted by Eelco Hillenius <ee...@gmail.com>.
Well... it's a pretty 'typical' server side 'discussion' :).
Eelco
On 24 Oct 2006 23:07:23 -0700, Sean Sullivan <se...@seansullivan.com> wrote:
>
> There was a good discussion about SLF4J on TheServerSide in March 2006:
>
> http://www.theserverside.com/news/thread.tss?thread_id=39369
>
> Alastair Maw wrote:
> >
> >
> > commons-logging is somewhat evil, with complex classloader
> > machinations that leak memory and resources if you're not careful. If
> > you haven't experienced commons-logging classloader hell, consider
> > yourself lucky.
> >
> > See the following:
> > http://radio.weblogs.com/0122027/2003/08/15.html
> > http://www.qos.ch/logging/classloader.jsp
> > http://jonasboner.com/?p=70
> > http://www.qos.ch/logging/thinkAgain.jsp
> > etc.
> >
> > SLF4J provides a nice simple alternative, which people in other OS
> > projects have been migrating to in droves recently. I suggest we
> > follow them.
> >
> > If we don't want to patch everything at once, there's a migration API:
> > http://www.slf4j.org/manual.html#gradual
> >
> > Thoughts?
> >
> >
>
>
Re: Re: Commons logging is evil
Posted by Martijn Dashorst <ma...@gmail.com>.
I'm +1 on replacing in 1.3 completely... no need to keep it backwards.
Martijn
On 10/25/06, Igor Vaynberg <ig...@gmail.com> wrote:
> i was under the impression that he does have an emulation layer, so you just
> remove the clogging jar and put the slf4j emulator in.
>
> that way you can make all current apps that rely on clogging work over slf4j
> instead.
>
> this is what we can do for 1.3
>
> and in 2.0 completely replace.
>
> problem is as a framework we dont want to be tied to any logging impl
> because the users will use a wide variety ( even though 99% prob use log4j
> :) )
>
> i have also experienced first hand clogging classloader hell when working on
> teachscape. most of that day was spent in yourkit swearing and bashing my
> head on nearby objects.
>
> -Igor
>
>
> On 10/25/06, Niclas Hedhman <ni...@hedhman.org> wrote:
> >
> > On 10/25/06, Al Maw <wi...@almaw.com> wrote:
> > >
> > > and the whole thing just isn't obvious or nice. SLF4J is.
> > >
> >
> > It would be even nicer if Ceki had the balls to hi-jack the
> > commons-logging
> > API and hard-wire it to be part of SLF4J, so that one just replace the
> > commons-logging-1.0.4.jar with the relevant slf4j-xxx-nnn.jar, and
> > transition is completed. Have discussed that with Ceki in the past, but he
> > is very reluctant. :o)
> >
> >
> > Cheers
> > Niclas
> >
> >
>
>
--
<a href="http://www.thebeststuffintheworld.com/vote_for/wicket">Vote</a>
for <a href="http://www.thebeststuffintheworld.com/stuff/wicket">Wicket</a>
at the <a href="http://www.thebeststuffintheworld.com/">Best Stuff in
the World!</a>
Re: Commons logging is evil
Posted by Igor Vaynberg <ig...@gmail.com>.
i was under the impression that he does have an emulation layer, so you just
remove the clogging jar and put the slf4j emulator in.
that way you can make all current apps that rely on clogging work over slf4j
instead.
this is what we can do for 1.3
and in 2.0 completely replace.
problem is as a framework we dont want to be tied to any logging impl
because the users will use a wide variety ( even though 99% prob use log4j
:) )
i have also experienced first hand clogging classloader hell when working on
teachscape. most of that day was spent in yourkit swearing and bashing my
head on nearby objects.
-Igor
On 10/25/06, Niclas Hedhman <ni...@hedhman.org> wrote:
>
> On 10/25/06, Al Maw <wi...@almaw.com> wrote:
> >
> > and the whole thing just isn't obvious or nice. SLF4J is.
> >
>
> It would be even nicer if Ceki had the balls to hi-jack the
> commons-logging
> API and hard-wire it to be part of SLF4J, so that one just replace the
> commons-logging-1.0.4.jar with the relevant slf4j-xxx-nnn.jar, and
> transition is completed. Have discussed that with Ceki in the past, but he
> is very reluctant. :o)
>
>
> Cheers
> Niclas
>
>
Re: Commons logging is evil
Posted by Niclas Hedhman <ni...@hedhman.org>.
On 10/25/06, Al Maw <wi...@almaw.com> wrote:
>
> and the whole thing just isn't obvious or nice. SLF4J is.
>
It would be even nicer if Ceki had the balls to hi-jack the commons-logging
API and hard-wire it to be part of SLF4J, so that one just replace the
commons-logging-1.0.4.jar with the relevant slf4j-xxx-nnn.jar, and
transition is completed. Have discussed that with Ceki in the past, but he
is very reluctant. :o)
Cheers
Niclas
Re: Commons logging is evil
Posted by Al Maw <wi...@almaw.com>.
Eelco Hillenius wrote:
> But Al, maybe you want to share what problems this would fix for you?
TBH, I rely on so many other libraries that use commons-logging in most
of my projects, that this isn't specifically going to fix anything for
me. However, I've enough hours dealing with nasty commons-logging
classloader pain to feel that the world would be a better place without
it, and that we should help to hasten its demise.
Even once you have commons-logging set up properly, with all the JARs in
the right place, it hangs onto things internally, preventing your
webapp's classloader from being garbage collected, and leading to your
container OutOfMemorying when you hot-deploy things. You need to call
Introspector.flushCaches() and all the rest of it in an attempt to fix
this, and the whole thing just isn't obvious or nice. SLF4J is.
So yeah, I guess this isn't terribly important, but I figure it'd be nice.
Al
Re: Re: Commons logging is evil
Posted by Eelco Hillenius <ee...@gmail.com>.
On 10/25/06, Martijn Dashorst <ma...@gmail.com> wrote:
> I'm -1 for 1.2.
Yeah, -1 for 1.2. too of course.
> 0/0 for 1.3 and 2.0, as jcl has served me/others well: as show n in
> the tss thread.
Seriously, I wish IBM never pushed their Logging API to be included in
the JDK and Sun instead adopted Log4J. But they didn't, and I think it
would be bad for a framework to bind on Lo4J (or JDK logging). So
that's where commons logging served us well. The part where it
doesn't, are the occasional class loader and leaking problems. If you
search the archives you'll even find that mentioned on Wicket threads
sometimes.
SLF4J should do a better job, as it was specifically designed to be a
'better' commons logging.
But Al, maybe you want to share what problems this would fix for you?
Eelco
Re: Re: Commons logging is evil
Posted by Martijn Dashorst <ma...@gmail.com>.
I'm -1 for 1.2.
0/0 for 1.3 and 2.0, as jcl has served me/others well: as show n in
the tss thread.
Martijn
On 24 Oct 2006 23:07:23 -0700, Sean Sullivan <se...@seansullivan.com> wrote:
>
> There was a good discussion about SLF4J on TheServerSide in March 2006:
>
> http://www.theserverside.com/news/thread.tss?thread_id=39369
>
> Alastair Maw wrote:
> >
> >
> > commons-logging is somewhat evil, with complex classloader
> > machinations that leak memory and resources if you're not careful. If
> > you haven't experienced commons-logging classloader hell, consider
> > yourself lucky.
> >
> > See the following:
> > http://radio.weblogs.com/0122027/2003/08/15.html
> > http://www.qos.ch/logging/classloader.jsp
> > http://jonasboner.com/?p=70
> > http://www.qos.ch/logging/thinkAgain.jsp
> > etc.
> >
> > SLF4J provides a nice simple alternative, which people in other OS
> > projects have been migrating to in droves recently. I suggest we
> > follow them.
> >
> > If we don't want to patch everything at once, there's a migration API:
> > http://www.slf4j.org/manual.html#gradual
> >
> > Thoughts?
> >
> >
>
>
--
<a href="http://www.thebeststuffintheworld.com/vote_for/wicket">Vote</a>
for <a href="http://www.thebeststuffintheworld.com/stuff/wicket">Wicket</a>
at the <a href="http://www.thebeststuffintheworld.com/">Best Stuff in
the World!</a>
Re: Commons logging is evil
Posted by Sean Sullivan <se...@seansullivan.com>.
There was a good discussion about SLF4J on TheServerSide in March 2006:
http://www.theserverside.com/news/thread.tss?thread_id=39369
Alastair Maw wrote:
>
>
> commons-logging is somewhat evil, with complex classloader
> machinations that leak memory and resources if you're not careful. If
> you haven't experienced commons-logging classloader hell, consider
> yourself lucky.
>
> See the following:
> http://radio.weblogs.com/0122027/2003/08/15.html
> http://www.qos.ch/logging/classloader.jsp
> http://jonasboner.com/?p=70
> http://www.qos.ch/logging/thinkAgain.jsp
> etc.
>
> SLF4J provides a nice simple alternative, which people in other OS
> projects have been migrating to in droves recently. I suggest we
> follow them.
>
> If we don't want to patch everything at once, there's a migration API:
> http://www.slf4j.org/manual.html#gradual
>
> Thoughts?
>
>
Re: Commons logging is evil
Posted by Frank Bille <fr...@gmail.com>.
After having read about it this is my oppinion
-1 for 1.2
+1 for 1.3 (perhaps with the "soft" transition)
+1 for 2.0 (totally replaced)
Frank
On 10/25/06, Juergen Donnerstag <ju...@gmail.com> wrote:
>
> -1 for 1.2
> 0 for 1.3
> +1 for 2.0
>
> Juergen
>
> On 10/25/06, Johan Compagner <jc...@gmail.com> wrote:
> > "complex classloader machinations" should be avoided at all time ;)
> >
> > but fine by me if it suits people better.
> > This api doesn't fall back automatically doesn't it? (if log4j is not
> found
> > then jdk14)
> > You need to place the right jars?
> >
> > So i guess instead of having commons-logging.jar we have 3 jars? (api,
> impl
> > and migration)
> >
> > johan
> >
> >
> > On 10/24/06, Alastair Maw <me...@almaw.com> wrote:
> > >
> > > Hi folks,
> > >
> > > commons-logging is somewhat evil, with complex classloader
> machinations
> > > that leak memory and resources if you're not careful. If you haven't
> > > experienced commons-logging classloader hell, consider yourself lucky.
> > >
> > > See the following:
> > > http://radio.weblogs.com/0122027/2003/08/15.html
> > > http://www.qos.ch/logging/classloader.jsp
> > > http://jonasboner.com/?p=70
> > > http://www.qos.ch/logging/thinkAgain.jsp
> > > etc.
> > >
> > > SLF4J provides a nice simple alternative, which people in other OS
> > > projects have been migrating to in droves recently. I suggest we
> follow
> > > them.
> > >
> > > If we don't want to patch everything at once, there's a migration API:
> > > http://www.slf4j.org/manual.html#gradual
> > >
> > > Thoughts?
> > >
> > > Best regards,
> > >
> > > Al
> > >
> >
> >
>
Re: Commons logging is evil
Posted by Juergen Donnerstag <ju...@gmail.com>.
-1 for 1.2
0 for 1.3
+1 for 2.0
Juergen
On 10/25/06, Johan Compagner <jc...@gmail.com> wrote:
> "complex classloader machinations" should be avoided at all time ;)
>
> but fine by me if it suits people better.
> This api doesn't fall back automatically doesn't it? (if log4j is not found
> then jdk14)
> You need to place the right jars?
>
> So i guess instead of having commons-logging.jar we have 3 jars? (api, impl
> and migration)
>
> johan
>
>
> On 10/24/06, Alastair Maw <me...@almaw.com> wrote:
> >
> > Hi folks,
> >
> > commons-logging is somewhat evil, with complex classloader machinations
> > that leak memory and resources if you're not careful. If you haven't
> > experienced commons-logging classloader hell, consider yourself lucky.
> >
> > See the following:
> > http://radio.weblogs.com/0122027/2003/08/15.html
> > http://www.qos.ch/logging/classloader.jsp
> > http://jonasboner.com/?p=70
> > http://www.qos.ch/logging/thinkAgain.jsp
> > etc.
> >
> > SLF4J provides a nice simple alternative, which people in other OS
> > projects have been migrating to in droves recently. I suggest we follow
> > them.
> >
> > If we don't want to patch everything at once, there's a migration API:
> > http://www.slf4j.org/manual.html#gradual
> >
> > Thoughts?
> >
> > Best regards,
> >
> > Al
> >
>
>
Re: Commons logging is evil
Posted by Johan Compagner <jc...@gmail.com>.
"complex classloader machinations" should be avoided at all time ;)
but fine by me if it suits people better.
This api doesn't fall back automatically doesn't it? (if log4j is not found
then jdk14)
You need to place the right jars?
So i guess instead of having commons-logging.jar we have 3 jars? (api, impl
and migration)
johan
On 10/24/06, Alastair Maw <me...@almaw.com> wrote:
>
> Hi folks,
>
> commons-logging is somewhat evil, with complex classloader machinations
> that leak memory and resources if you're not careful. If you haven't
> experienced commons-logging classloader hell, consider yourself lucky.
>
> See the following:
> http://radio.weblogs.com/0122027/2003/08/15.html
> http://www.qos.ch/logging/classloader.jsp
> http://jonasboner.com/?p=70
> http://www.qos.ch/logging/thinkAgain.jsp
> etc.
>
> SLF4J provides a nice simple alternative, which people in other OS
> projects have been migrating to in droves recently. I suggest we follow
> them.
>
> If we don't want to patch everything at once, there's a migration API:
> http://www.slf4j.org/manual.html#gradual
>
> Thoughts?
>
> Best regards,
>
> Al
>
Re: Commons logging is evil
Posted by Eelco Hillenius <ee...@gmail.com>.
+1. Just plugged it in for Jetty's config for teachscape, and I like
it a lot better.
Eelco
On 10/25/06, Igor Vaynberg <ig...@gmail.com> wrote:
> i was going to propose this as well so obviously im +1
>
> -Igor
>
>
> On 10/24/06, Alastair Maw <me...@almaw.com> wrote:
> >
> > Hi folks,
> >
> > commons-logging is somewhat evil, with complex classloader machinations
> > that leak memory and resources if you're not careful. If you haven't
> > experienced commons-logging classloader hell, consider yourself lucky.
> >
> > See the following:
> > http://radio.weblogs.com/0122027/2003/08/15.html
> > http://www.qos.ch/logging/classloader.jsp
> > http://jonasboner.com/?p=70
> > http://www.qos.ch/logging/thinkAgain.jsp
> > etc.
> >
> > SLF4J provides a nice simple alternative, which people in other OS
> > projects have been migrating to in droves recently. I suggest we follow
> > them.
> >
> > If we don't want to patch everything at once, there's a migration API:
> > http://www.slf4j.org/manual.html#gradual
> >
> > Thoughts?
> >
> > Best regards,
> >
> > Al
> >
>
>
Re: Commons logging is evil
Posted by Igor Vaynberg <ig...@gmail.com>.
i was going to propose this as well so obviously im +1
-Igor
On 10/24/06, Alastair Maw <me...@almaw.com> wrote:
>
> Hi folks,
>
> commons-logging is somewhat evil, with complex classloader machinations
> that leak memory and resources if you're not careful. If you haven't
> experienced commons-logging classloader hell, consider yourself lucky.
>
> See the following:
> http://radio.weblogs.com/0122027/2003/08/15.html
> http://www.qos.ch/logging/classloader.jsp
> http://jonasboner.com/?p=70
> http://www.qos.ch/logging/thinkAgain.jsp
> etc.
>
> SLF4J provides a nice simple alternative, which people in other OS
> projects have been migrating to in droves recently. I suggest we follow
> them.
>
> If we don't want to patch everything at once, there's a migration API:
> http://www.slf4j.org/manual.html#gradual
>
> Thoughts?
>
> Best regards,
>
> Al
>