groovy/groovy-core — pull request #82 by bura (2012-12-14 12:32:08+00:00)
Title: Add includePackage flag to @ToString annotation.

I use a toString method for logging variable values and the message obtained contain redundant information. For example:

/* Bean file */
package my.company.data.mongo.schema

@ToString
class Bean {...}

/* Bean repo file */
package my.company.data.mongo.repo

class BeanRepo {
Logger log = LoggerFactory.getLogger(BeanRepo)
...
if (log.isDebug()) {
log.debug("Result of 'findBean' is '${result}'")
}
}

/* Log output */
...
12.12.14 17:40:40.625 DEBUG my.company.data.mongo.repo.BeanRepo - Result of 'findBean' is 'my.company.data.mongo.schema.Bean(id: 789ac8d3)'
...

But may be is:

12.12.14 17:40:40.625 DEBUG my.company.data.mongo.repo.BeanRepo - Result of 'findBean' is 'Bean(id: 789ac8d3)'