[ 
https://issues.apache.org/jira/browse/HBASE-19449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16282974#comment-16282974
 ] 

BELUGA BEHR commented on HBASE-19449:
-------------------------------------

@stack - I can't quite figure out how to tag you in JIRA... seems "@stack" hits 
a lot of results and then there's no more selective criteria to use. :)

I see that SLF4J is already included in the project, so I didn't have to add it 
as a dependency.

I'm sorry I got a bit overzealous and just threw this patch out there.  Thank 
you for your interest and the dialogue.

Commons Logging states that it requires one to use code guards for logging 
debug/trace statements.  This class just happened to have quite a few 
trace-level logging statements, so I started with this one.  SLF4J recommends 
using parameters for logging which.  SLF4J proposes the faster (and I 
personally think) cleaner method of using parameters in the logging statements 
that are only resolved if the log level is appropriate.  It removes code (the 
guards) and complexity from the application code.

https://www.slf4j.org/faq.html#logging_performance
https://commons.apache.org/proper/commons-logging/guide.html#Code_Guards

> Implement SLF4J and SLF4J Parameter Substitution
> ------------------------------------------------
>
>                 Key: HBASE-19449
>                 URL: https://issues.apache.org/jira/browse/HBASE-19449
>             Project: HBase
>          Issue Type: Improvement
>          Components: hbase
>    Affects Versions: 2.0.0
>            Reporter: BELUGA BEHR
>            Assignee: BELUGA BEHR
>            Priority: Trivial
>             Fix For: 2.0.0
>
>         Attachments: HBASE-19449.1.patch, HBASE-19449.2.patch, 
> HBASE-19449.3.patch
>
>
> For the {{HFileArchiver.java}} class...
> * Use SLF4J logging
> * Use SLF4J parameter substitution
> * Fix some small issues with missing spaces between words in the log message 
> and the like
> https://www.slf4j.org/faq.html#logging_performance



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to