[ 
https://issues.apache.org/jira/browse/HADOOP-6884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899352#action_12899352
 ] 

Steve Loughran commented on HADOOP-6884:
----------------------------------------

Luke Lu _said Feature/design/performance aside, the main problem of commons 
logging is that there are no active maintainers working on it (last release in 
2007), unlike slf4j. _

We can fix that, if the project is idle it could be taken over, but I fear the 
#of open bugreps. The thought appeals though. Strip out avalon support, pare 
back the POM files and assume log4j and java.util are the two backends. 

Maybe I've just had too much negative experience of SLF4J the redistributable, 
rather than as an API.
# it's another JAR
# you also need to choose at redist time what your back end will be and include 
that JAR
# If you don't want to log things like Jetty through it you have to write your 
own bridge specifically for that app [1] and make sure it's on the classpath.

so: I get to deal with the downstream problems, things not logging, things not 
logging in forked JVMs, etc, the SLF4J api is something I have no knowledge of.

Of course, the other tactic is to say "no layers, go to log4j" and work with 
the log4j team on having log4j push out data to chukwa and scribus, feed it 
back into Hadoop for analysis. Just a thought.

[1] 
http://smartfrog.svn.sourceforge.net/viewvc/smartfrog/trunk/core/components/jetty/src/org/smartfrog/services/jetty/log/JettyToCommonsLogger.java?revision=8363&view=markup


> Add LOG.isDebugEnabled() guard for each LOG.debug("...")
> --------------------------------------------------------
>
>                 Key: HADOOP-6884
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6884
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.22.0
>            Reporter: Erik Steffl
>            Assignee: Erik Steffl
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6884-0.22-1.patch, HADOOP-6884-0.22.patch
>
>
> Each LOG.debug("...") should be executed only if LOG.isDebugEnabled() is 
> true, in some cases it's expensive to construct the string that is being 
> printed to log. It's much easier to always use LOG.isDebugEnabled() because 
> it's easier to check (rather than in each case reason whether it's necessary 
> or not).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to