Hello all,

On Dec 13, 2007 3:50 AM, Trustin Lee <[EMAIL PROTECTED]> wrote:

> This issue is becoming a real headache even a bottle of tylenol can't
> fix, along with the reentrant logging issue: http://xrl.us/bctaa
>
> I think these two issues should be considered together to resolve the
> issues related with logging.  Let me summarize current situation:
>
> 1) There are people (A) who don't want to use SLF4J but java.util.logging.
> 2) There are people (B) who like to use SLF4J and they say SLF4J
> supports java.util.logging along with log4j.
> 3) People A say java.util.logging can also do the same by employing a
> proper LogManager implementation.
> 4) There is a logger reentrance problem in MINA, which means it is
> difficult to write a MINA-based appender for the most logging
> frameworks that doesn't allow reentrance.  This problem can be worked
> around by turning off logging in MINA, but this is not reasonable.



about (4) : I thought the deadlock is caused by a bug in log4j (namely that
it doesn't use proper synchronization) ?
If that's the case I think we should not try to fix it in MINA.

about (1) and (3) : I have (almost) no experience with java.util.logging but
I from the info in this thread I understand that is necessary to set a
system property to use a custom LogManager.
This means two webapps deployed on the same tomcat instance MUST share the
same LogManager ?
One could argue that this is tomcat's fault, because it should have separate
system properties per webapp ...


Without considering the item #4, it might look like a debate about
> choosing the default logging framework for MINA 2.  However, taking
> the item #4 into picture, it leads me to think we need a thin built-in
> layer for logging that is dedicated to MINA.  Moreover, such a layer
> could satisfy both party (people A and B).  Also, we could make the
> SLF4J dependency optional by making java.util.logging the default
> logger.  This will potentially reduce the barrier of configuring SLF4J
> which is frequently asked.


I don't understand the so-called "barrier of configuring SLF4J".
There is NO configuration, just using the jar of your choice. And optionally
configuring the framework of your choice.

And I don't understand why people have problems with a dependency on SLF4J ?

I don't like the idea of a thin layer inside MINA, why would that be any
better than depend on SLF4J ?
Would people A find it more acceptable if the SLF4J classes where included
inside the mina jar ? (this doesn't make sense to me, but then they wouldn't
SEE the SLF4J dependency)

SLF4J has a richer API than JUL (MDC, Marker, varargs, ...)
Using java.util.logging directly in MINA means we would lose the ability to
use this API.

So many projects are using SLF4J, do they get the same questions ?

>From the poll we did in september, only one person (out of 19) was using
java.util.logging.
I wonder how many MINA users REALLY have a problem with SLF4J.

Of course, this doesn't mean that users have to use that logging layer
> to log their application messages but it means only the classes under
> org.apache.mina should use that layer for all logging.
>
> Does my idea make sense?  Or do you have any better idea?


I am clearly part of people B :-)
To be short, I fail to see the problem (under the assumpton that (4) is a
problem in log4j not in Mina)

>
>
> We are all obssessed in logging right? :D


I am not!  :D

regards,
Maarten

Reply via email to