|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Replace commons-logging with slf4j?Hi,
As we all know, commons-logging is discontinued and slf4j should be preferred. Adding support for slf4j (still keeping backwards compatibility with classes that use commons-logging) is an easy task: Just make BuilderLogFacet handle slf4j Loggers as well. Maybe, it would be desirable to use Reflection for commons-logging in order to avoid being forced to add jcl-over-slf4j to the classpath if it's not needed. Cheers, Raffi -- The difference between theory and practice is that in theory, there is no difference, but in practice, there is. herzog@... · Jabber: herzog@... PGP Key 0x5FFDB5DB5D1FF5F4 · http://keyserver.pgp.com |
|
|
Re: Replace commons-logging with slf4j?Am Mittwoch, 25. Juni 2008 13.08:43 schrieb Raffael Herzog:
> As we all know, commons-logging is discontinued and slf4j should be > preferred. Ooops ... I just see that commons-logging is NOT discontinued ... sorry about that. Still, the option of using slf4j instead (or additionally) would be nice. Cheers, Raffi -- The difference between theory and practice is that in theory, there is no difference, but in practice, there is. herzog@... · Jabber: herzog@... PGP Key 0x5FFDB5DB5D1FF5F4 · http://keyserver.pgp.com |
|
|
Re: Replace commons-logging with slf4j?If you want, you can still use slf4j. The libraries you use don't
have to switch. They have a bridge between JCL and SLF4J. On Wed, Jun 25, 2008 at 7:22 AM, Raffael Herzog <herzog@...> wrote: > Am Mittwoch, 25. Juni 2008 13.08:43 schrieb Raffael Herzog: >> As we all know, commons-logging is discontinued and slf4j should be >> preferred. > > Ooops ... I just see that commons-logging is NOT discontinued ... sorry > about that. Still, the option of using slf4j instead (or additionally) > would be nice. > > Cheers, > Raffi > > -- > The difference between theory and practice is that in theory, there is > no difference, but in practice, there is. > > herzog@... · Jabber: herzog@... > PGP Key 0x5FFDB5DB5D1FF5F4 · http://keyserver.pgp.com > |
|
|
Re: Replace commons-logging with slf4j?Am Mittwoch, 25. Juni 2008 13.48:17 schrieb James Carman:
> If you want, you can still use slf4j. The libraries you use don't > have to switch. They have a bridge between JCL and SLF4J. Yes, I know. But I'm still bound to the (IMHO inferior) org.apache.commons.logging.Log because currently, HiveMind doesn't inject org.slf4j.Logger instances (which, BTW, I added in HiveApp). Also, while it would actually work, mixing org.apache.commons.logging.Log with org.slf4j.MDC would look very strange ... Actually, I don't care what HiveMind uses internally, if people want to keep using commons-logging, I'm fine with that. So maybe the other way round: Use slf4j via reflection, so nobody's forced to add it to the class- path ... :) Cheers, Raffi -- The difference between theory and practice is that in theory, there is no difference, but in practice, there is. herzog@... · Jabber: herzog@... PGP Key 0x5FFDB5DB5D1FF5F4 · http://keyserver.pgp.com |
|
|
Re: Replace commons-logging with slf4j?On Wed, Jun 25, 2008 at 7:55 AM, Raffael Herzog <herzog@...> wrote:
> Am Mittwoch, 25. Juni 2008 13.48:17 schrieb James Carman: >> If you want, you can still use slf4j. The libraries you use don't >> have to switch. They have a bridge between JCL and SLF4J. > > Yes, I know. But I'm still bound to the (IMHO inferior) > org.apache.commons.logging.Log because currently, HiveMind doesn't inject > org.slf4j.Logger instances (which, BTW, I added in HiveApp). Also, while it > would actually work, mixing org.apache.commons.logging.Log with > org.slf4j.MDC would look very strange ... JCL does have its problems, we have to concede that. So, you just have issue with the fact that you can't have your "logger" injected automatically via HiveMind's BuilderFactory, right? You gave me an interesting idea. Perhaps the "autoinjectors" should be configurable (and the default ones should also be conditional based on what's on the classpath, so that we could add in slf4j support easily). We should file a JIRA for this. Since you came up with the idea (I'm not selfless, but lazy :), why don't you file a JIRA so that we don't lose it? |
|
|
Re: Replace commons-logging with slf4j?Am Mittwoch, 25. Juni 2008 14.30:44 schrieb James Carman:
> JCL does have its problems, we have to concede that. So, you just > have issue with the fact that you can't have your "logger" injected > automatically via HiveMind's BuilderFactory, right? You gave me an > interesting idea. Perhaps the "autoinjectors" should be configurable > (and the default ones should also be conditional based on what's on > the classpath, so that we could add in slf4j support easily). Yeah, I thought about that, too, when I copied BuilderFactory over to HiveApp to add my stuff for AppBuilderFactory. Then I thought: "Well, but now, I've got it all, most of the remaining stuff people might want to do are perfectly possible using object providers", so I stopped there. Then again, my first posting here was about opening HiveMind more to make it easier to extend its core. From that POV, pluggable injectors are the way to go. > We > should file a JIRA for this. Since you came up with the idea (I'm not > selfless, but lazy :), why don't you file a JIRA so that we don't lose > it? OK, I'll do it. I'm lazy myself, however. I would also help implementing it, actually. Cheers, Raffi -- The difference between theory and practice is that in theory, there is no difference, but in practice, there is. herzog@... · Jabber: herzog@... PGP Key 0x5FFDB5DB5D1FF5F4 · http://keyserver.pgp.com |
|
|
Re: Replace commons-logging with slf4j?On Wed, Jun 25, 2008 at 8:52 AM, Raffael Herzog <herzog@...> wrote:
> OK, I'll do it. I'm lazy myself, however. I would also help implementing it, > actually. That would be great! As you probably know, HiveMind needs a little TLC right now and most of us developers are finding it difficult to devote the time needed. So, any extra set of hands will be appreciated. I will do my best to try to apply patches when they are submitted. We really need to get this HiveMind community back up and running! :) |
| Free embeddable forum powered by Nabble | Forum Help |