[ 
http://issues.apache.org/jira/browse/DIRMINA-233?page=comments#action_12424873 
] 
            
Rob Butler commented on DIRMINA-233:
------------------------------------

The entire point of Commons-logging and SLF4J is to _be_ the thin logging 
abstraction layer and alleviate the need for every application, library and 
framework to re-implement the same code.  I would highly recommend not building 
your own abstraction layer to abstract yourself from these abstraction layers.  
That is a very dangerous architecture anti-pattern.

Emmanuel had the right idea.  SLF4J and Commons-logging are just facades above 
the real logging implementation.  There is nothing to prevent Mina from using 
SLF4J and Spring using Commons-Logging and my application code from using log4j 
directly and having all of them use log4j under the covers.  Mina's choice in 
logging abstraction implementation does not force a choice on users of Mina.  
It only would force them to include the SLF4J jar in their application and 
configure it to use the proper logger (whichever one their application uses).  
Having to include one small extra jar in an application isn't too much of a 
limitation.

As for QuickFIX/J and JAMES, they should be able to use Mina and simply 
configure SLF4J to write to their preferred logger implementation.  If SLF4J 
doesn't supply an Avalon logger (or whatever) then they should build a plugin 
for the abstraction layer Mina already uses.  Ideally they would contribute 
this implementation to SLF4J so that any application using SLF4J could log to 
Avalon.  This shouldn't be any more work than building a plugin to a Mina 
custom logging abstraction layer.

Mina should definitely use either SLF4J or Commons-logging instead of building 
its own.  However, you may want to consider converting to Commons-logging.  
Commons-logging is part of Apache and eating your own dog food is a good thing. 
 Also, Commons-logging probably has  a larger community and people are more 
familiar with it.  SLF4J's claim to fame was it would resolve some of the 
classloader issues Commons-logging had, but they are supposed to have fixed 
that issue in the latest version.  I think SLF4J's community probably will 
never be as strong as the Commons-logging one and there is some risk of SLF4J 
losing its community all together if it doesn't grow sufficient mass to be self 
sustaining.

> Provide an extra thin logging layer for those who don't want SLF4J
> ------------------------------------------------------------------
>
>                 Key: DIRMINA-233
>                 URL: http://issues.apache.org/jira/browse/DIRMINA-233
>             Project: Directory MINA
>          Issue Type: Task
>            Reporter: Trustin Lee
>
> As MINA gets more and more popular, the number of people who doesn't want 
> SLF4J increased because they were using other logging frameworks such as 
> Log4J or commons-logging.  We know SLF4J provides what exactly Log4J or 
> commons-logging provides, but it's just a matter of preference.  We need to 
> meet as many people's preference as we can as a general network application 
> framework.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to