busbey commented on a change in pull request #913: HBASE-23381: Improve Logging in HBase Commons Package URL: https://github.com/apache/hbase/pull/913#discussion_r355209994
########## File path: hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java ########## @@ -151,20 +149,18 @@ public synchronized boolean scheduleChore(ScheduledChore chore) { try { if (chore.getPeriod() <= 0) { - LOG.info("Chore {} is disabled because its period is not positive.", chore); + LOG.info("Chore {} is disabled because its period is not positive", chore); return false; } - LOG.info("Chore {} is enabled.", chore); + LOG.info("Chore {} is enabled", chore); chore.setChoreServicer(this); ScheduledFuture<?> future = scheduler.scheduleAtFixedRate(chore, chore.getInitialDelay(), chore.getPeriod(), chore.getTimeUnit()); scheduledChores.put(chore, future); return true; } catch (Exception exception) { - if (LOG.isInfoEnabled()) { - LOG.info("Could not successfully schedule chore: " + chore.getName()); - } + LOG.info("Could not successfully schedule chore: " + chore.getName()); Review comment: Please use parameterized logging for the name. Also probably better to just pass the chore so we get the name and the desired period. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services