jdaugherty commented on code in PR #15557:
URL: https://github.com/apache/grails-core/pull/15557#discussion_r3341563931


##########
grails-logging/src/main/groovy/org/grails/compiler/logging/LoggingTransformer.java:
##########
@@ -78,11 +80,24 @@ public void performInjectionOnAnnotatedClass(SourceUnit 
source, ClassNode classN
             return;
         }
 
-        AnnotationNode annotationNode = new 
AnnotationNode(ClassHelper.make(Slf4j.class));
-        LogASTTransformation logASTTransformation = new LogASTTransformation();
-        logASTTransformation.setCompilationUnit(new CompilationUnit(new 
GroovyClassLoader(getClass().getClassLoader())));
-        logASTTransformation.visit(new ASTNode[]{ annotationNode, classNode}, 
source);
-        classNode.putNodeMetaData(Slf4j.class, annotationNode);
+        // Groovy 5: an @Slf4j added during an AST transform is not processed, 
so inject the log field manually.

Review Comment:
   @paulk-asert I thought I remember reading somewhere that this was fixed.  Is 
this really still an issue? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to