[ 
https://jira.qos.ch/browse/SLF4J-436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19181#comment-19181
 ] 

Tobias Gruetzmacher commented on SLF4J-436:
-------------------------------------------

After some more prodding, the culprit here isn't even spock, but in Groovy: 
Whenever you use Groovy's metaObject, the call to getLogger goes through some 
internal Groovy classes...

> Logger name mismatch when using Spock
> -------------------------------------
>
>                 Key: SLF4J-436
>                 URL: https://jira.qos.ch/browse/SLF4J-436
>             Project: SLF4J
>          Issue Type: Bug
>          Components: Core API
>    Affects Versions: 1.7.25, 1.8.0-beta2
>            Reporter: Tobias Gruetzmacher
>            Assignee: SLF4J developers list
>            Priority: Minor
>         Attachments: slf4j-spock-name-mismatch.zip
>
>
> When using the Spock Framework ([http://spockframework.org/)] in combination 
> with *slf4j.detectLoggerNameMismatch* you get logger mismatch messages like 
> this:
> {noformat}
> SLF4J: Detected logger name mismatch. Given name: "org.example.MismatchTest"; 
> computed name: "org.slf4j.LoggerFactory$getLogger".
> SLF4J: See http://www.slf4j.org/codes.html#loggerNameMismatch for an 
> explanation{noformat}
> It seems that Spock does some magic with its test classes...
> Sample maven project attached.



--
This message was sent by Atlassian JIRA
(v7.3.1#73012)
_______________________________________________
slf4j-dev mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/slf4j-dev

Reply via email to