On rare occasions, it can be desirable for a logger to be non-private.
Consider a @Log-annotated class with a method containing anonymous closures that log using the class's AST-injected logger.
Invoking new BaseClient().fetchDocuments('86375968') works as expected. However, if a subclass is written that invokes the parent method, such as:
Invoking new Client().documents surprisingly results in a groovy.lang.MissingPropertyException: No such property: log for class: groovyx.net.http.HTTPBuilder$RequestConfigDelegate error. I believe this is due to the closure delegation being done via the subclass, which does not have visibility to the parent class's private fields--namely, the injected log field.
Other than a design change, or by defining a new log variable within the parent method (def log = log, this problem can be avoided if the log field had protected visibility.
Here's an example of how it would look.