[ https://issues.apache.org/jira/browse/LUCENE-7788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17110634#comment-17110634 ]
David Smiley commented on LUCENE-7788: -------------------------------------- There were lines like this that didn't have the surrounding isXXXEnabled check until you added them: {code:java} log.info("Error on getting remote info, trying again: {}", e.getMessage()); {code} Where {{e}} is an Exception. I often see this and argue this should be avoided, as it's better to simply supply "e" here because the toString on an Exception has more information which can be semantically meaningful. An example is a FileNotFoundException, where the message is merely the name of the file but lacks what the problem was. Now there's a new reason to do this -- no wrapping of isInfoEnabled :-) > fail precommit on unparameterised log messages and examine for wasted > work/objects > ---------------------------------------------------------------------------------- > > Key: LUCENE-7788 > URL: https://issues.apache.org/jira/browse/LUCENE-7788 > Project: Lucene - Core > Issue Type: Task > Reporter: Christine Poerschke > Assignee: Erick Erickson > Priority: Minor > Fix For: 8.6 > > Attachments: LUCENE-7788.patch, LUCENE-7788.patch, gradle_only.patch, > gradle_only.patch > > Time Spent: 50m > Remaining Estimate: 0h > > SOLR-10415 would be removing existing unparameterised log.trace messages use > and once that is in place then this ticket's one-line change would be for > 'ant precommit' to reject any future unparameterised log.trace message use. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org