Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
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.
Attachments
Issue Links
- is fixed by
-
LUCENE-7788 fail precommit on unparameterised log messages and examine for wasted work/objects
-
- Closed
-