[ 
https://issues.apache.org/jira/browse/SOLR-12301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erick Erickson updated SOLR-12301:
----------------------------------
    Description: 
See the discussion at SOLR-12286 for a lot of background, but the short form is 
that logging calls of the form

log.info("somehting" + "something");
 and
 log.info("soemthing {}", object.someFunction());

where someFunction includes toString()

generate useless garbage/work even when the message is not printed.

log.info("somehting {}", "something");
 and
 log.info("soemthing {}", object);

do not. The first form is something of a relic, and there are even some uses of 
the second.

This will entail a LOT of changes, but almost all secretarial. I'll take it in 
chunks.

  was:
See the discussion at SOLR-12286 for a lot of background, but the short form is 
that logging calls of the form

log.info("somehting" + "something");
and
log.info("soemthing {}", object.toString());

generate useless garbage even when logging at a more restrictive level (say 
WARN), whereas

log.info("somehting {}", "something");
and
log.infl("soemthing {}", object);

do not. The first form is something of a relic, and there are even some uses of 
the second.

So, let's tackle subsets of the source code as subordinate JIRAs




> Umbrella issue: paramaterize logging calls in Solr, use consistent naming 
> conventions for the logger
> ----------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-12301
>                 URL: https://issues.apache.org/jira/browse/SOLR-12301
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Erick Erickson
>            Assignee: Erick Erickson
>            Priority: Major
>
> See the discussion at SOLR-12286 for a lot of background, but the short form 
> is that logging calls of the form
> log.info("somehting" + "something");
>  and
>  log.info("soemthing {}", object.someFunction());
> where someFunction includes toString()
> generate useless garbage/work even when the message is not printed.
> log.info("somehting {}", "something");
>  and
>  log.info("soemthing {}", object);
> do not. The first form is something of a relic, and there are even some uses 
> of the second.
> This will entail a LOT of changes, but almost all secretarial. I'll take it 
> in chunks.



--
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

Reply via email to