[ https://issues.apache.org/jira/browse/MAPREDUCE-7007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16250235#comment-16250235 ]
Jason Lowe commented on MAPREDUCE-7007: --------------------------------------- I would think this would be better addressed with the move to SLF4J. That supports concatenation at log time rather than call time with the {} notation. For example: {code} LOG.debug("splits[{}]={} count={}", j, splits[j], count); {code} > Add LOG.isDebugEnabled() guard for each LOG.debug() > --------------------------------------------------- > > Key: MAPREDUCE-7007 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-7007 > Project: Hadoop Map/Reduce > Issue Type: Improvement > Reporter: Mehran Hassani > Priority: Minor > > I am conducting research on log related bugs. I tried to make a tool to fix > repetitive yet simple patterns of bugs that are related to logs. In these > files, there are debug level logging statements containing multiple string > concatenation without the if statement before them: > hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestKeyValueTextInputFormat.java, > LOG.debug("splits["+j+"]="+splits[j]+" count=" + count);, 123 > hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestTextInputFormat.java, > LOG.debug("splits["+j+"]="+splits[j]+" count=" + count);, 137 > hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestTextInputFormat.java, > LOG.debug("splits[" + j + "]=" + splits[j] + " count=" + counter);, 254 > hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestTextInputFormat.java, > LOG.debug("splits["+j+"]="+splits[j]+" count=" + counter);, 315 > hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/input/TestMRKeyValueTextInputFormat.java, > LOG.debug("splits[" + j + "]=" + splits.get(j) +" count=" + count);, 146 > hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/input/TestMRKeyValueTextInputFormat.java, > LOG.debug("splits["+j+"]="+splits.get(j)+" count=" + count);, 244 > Would you be interested in adding the if before these logging statements? -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: mapreduce-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: mapreduce-issues-h...@hadoop.apache.org