Reputation: 1559
I like the @Log
family of annotations in groovy.util.logging and want to use them, but it's awfully tedious to have to remember to add that annotation to every class.
Is there a way to use Groovy's AST Transformation feature to do something like this:
@Log
annotations does not existThe goal is to not have to manually put @Log
in front of every class declaration within my package hierarchy so I can just use log.info()
etc. from everywhere without thinking about it.
Upvotes: 0
Views: 41
Reputation: 481
I'm not sure how to do it by package, but you might want to look at Groovy's compilation customizers: http://docs.groovy-lang.org/next/html/documentation/#compilation-customizers
Upvotes: 1