[ 
https://issues.apache.org/jira/browse/GROOVY-10716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575707#comment-17575707
 ] 

Alexander Kotikhov commented on GROOVY-10716:
---------------------------------------------

[~paulk] 
You are right, this solution works.
BUT IntelliJIDEa does not support my annotation at all.



And if the intention was not to allow customization, then loggingStrategy would 
need to be removed making customization through inheritance from 
"org.codehaus.groovy.transform.LogASTTransformation".

The fact that loggingStrategy doesn't work seems unconsistent, as the other 
options (visibilityId,category,value) work well should be.

Please include the fix into the nearest release.

> Impossible to change logging Strategy 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
>         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