Alexander Kotikhov created GROOVY-10716:
-------------------------------------------
Summary: Unpossible to change loggingStrategy in @Slf4j and other
log annotations
Key: GROOVY-10716
URL: https://issues.apache.org/jira/browse/GROOVY-10716
Project: Groovy
Issue Type: Bug
Components: ast builder
Affects Versions: 4.0.3, 4.0.2
Reporter: Alexander Kotikhov
Fix For: 4.x
Attachments: createLoggingStrategy-snippet.java
I defined a groovy class with @Slf4j annotation with custom logging strategy,
like this:
{code:groovy}
@Slf4j(loggingStrategy=MyStrategy)
class Foo {
public String getFoo() {
log.error("Hi")
}
}
{code}
But it remains use the original strategy.
The problem is in the LogASTTransformation#createLoggingStrategy method where
loggingStrategy is always obtained from the default value.
Attachment contains source of fixed method.
Please include the fix into the nearest release.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)