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

Class path contains multiple SLF4J bindings

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • None
    • 1.5.x
    • Core API
    • None
    • Operating System: All
      Platform: All

    Description

      Hi,

      Problem description:
      "Class path contains multiple SLF4J bindings" message appears in WebLogic 10.3 log during startup of an application with SLF4J 1.5.8.
      The problem is that exactly the same binding is printed twice and therefore the warning is irrelevant:
      SLF4J: Found binding in [zip:/servers/WLServer/tmp/_WL_user/MyApplication/he3hgg/epc.jar!/org/slf4j/impl/StaticLoggerBinder.class]

      Suggested solution:
      In org.slf4j.LoggerFactory.singleImplementationSanityCheck() method in line 192 getResources somehow returns 2 exactly the same bindings:
      Enumeration paths = LoggerFactory.class.getClassLoader().getResources(
      STATIC_LOGGER_BINDER_PATH);

      So using Set implementationSet = new HashList();
      in line 194 instead of List implementationList = new ArrayList();
      will solve such irrelevant warning.

      Attachments

        Activity

          People

            slf4j-dev SLF4J developers list
            alexkr Alex
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: