[
https://issues.apache.org/jira/browse/HBASE-24029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Huaxiang Sun reassigned HBASE-24029:
------------------------------------
Assignee: Huaxiang Sun (was: Hua Xiang)
> Convert logging code to use Parameters when possible
> -----------------------------------------------------
>
> Key: HBASE-24029
> URL: https://issues.apache.org/jira/browse/HBASE-24029
> Project: HBase
> Issue Type: Improvement
> Affects Versions: master, 2.4.0
> Reporter: Huaxiang Sun
> Assignee: Huaxiang Sun
> Priority: Minor
>
> Based on [~ndimiduk]'s comments in HBASE-23957 ,
> {code:java}
> nit: we make a habit of using the logger's format string capability. That way
> it only performs the computation necessary to build the log message if the
> logger is emitting messages at the target level.
> LOG.debug("Starting the test {}", name.getMethodName()){code}
> and
> [http://blog.logscape.com/2017/03/concatenation-or-parameters-both-whats-the-top-method-of-java-logging/],
>
> I did a quick search of the code base and found
> [https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java#L334]
>
> This needs to be converted to use parameter instead of string concatenation.
> .
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)