[jira] [Commented] (LUCENE-6686) Improve InforStream API
[ https://issues.apache.org/jira/browse/LUCENE-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14636522#comment-14636522 ] Cao Manh Dat commented on LUCENE-6686: -- Thanks [~dweiss] Improve InforStream API --- Key: LUCENE-6686 URL: https://issues.apache.org/jira/browse/LUCENE-6686 Project: Lucene - Core Issue Type: Improvement Reporter: Cao Manh Dat Currently, We use InfoStream in duplicated ways. For example {code} if (infoStream.isEnabled(IW)) { infoStream.message(IW, init: loaded commit \ + commit.getSegmentsFileName() + \); } {code} Can we change the API of InfoStream to {code} infoStream.messageIfEnabled(component,message); {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6686) Improve InforStream API
[ https://issues.apache.org/jira/browse/LUCENE-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14633099#comment-14633099 ] Dawid Weiss commented on LUCENE-6686: - This has really been reinvented over and over in logging APIs. The {{isEnabled(level)}} idiom is necessary when argument construction is complex and costly (so that you want to avoid it before the method call). Improve InforStream API --- Key: LUCENE-6686 URL: https://issues.apache.org/jira/browse/LUCENE-6686 Project: Lucene - Core Issue Type: Improvement Reporter: Cao Manh Dat Currently, We use InfoStream in duplicated ways. For example {code} if (infoStream.isEnabled(IW)) { infoStream.message(IW, init: loaded commit \ + commit.getSegmentsFileName() + \); } {code} Can we change the API of InfoStream to {code} infoStream.messageIfEnabled(component,message); {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org