[ 
https://issues.apache.org/jira/browse/GROOVY-10716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexander Kotikhov updated GROOVY-10716:
----------------------------------------
    Fix Version/s: 4.0.5
                       (was: 4.x)

> 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.2, 4.0.3
>            Reporter: Alexander Kotikhov
>            Priority: Major
>             Fix For: 4.0.5
>
>         Attachments: createLoggingStrategy-snippet.java
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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)

Reply via email to