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

Logger name mismatch when using Groovy metaprogramming

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 1.7.25, 1.8.0-beta2
    • Core API
    • 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

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

            Dates

              Created:
              Updated: