Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-436

Logger name mismatch when using Groovy metaprogramming

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.7.25, 1.8.0-beta2
    • Fix Version/s: None
    • Component/s: Core API
    • Labels:
      None

      Description

      When using the Spock Framework (http://spockframework.org/) in combination with slf4j.detectLoggerNameMismatch you get logger mismatch messages like this:

      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

      It seems that Spock does some magic with its test classes...

      Sample maven project attached.

        Attachments

          Activity

            People

            • Assignee:
              slf4j-dev SLF4J developers list
              Reporter:
              tgr Tobias Gruetzmacher
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: