Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
At the GR8 conference in Kobenhagen a group decided to write a local transform to supply an injection like logging ability as part of the hackergarten. This transform injects a field named log, initialized with a logger java.util.Logger and will replace all method calls on all free variables named "log" with an surrounding if to avoid the evaluation of costly expressions
log.info(database.getTheQuestionFor42()) //takes a lot of time
will be transformed to
if (log.isLoggable(Level.INFO)) { // doesn't take long log.info(database.getTheQuestionFor42()) // this still does }
Attachments
Issue Links
- is related to
-
GROOVY-973 provide a simple yet powerful logging facility
- Closed