Uploaded image for project: 'Parquet'
  1. Parquet
  2. PARQUET-369

Shading SLF4J prevents SLF4J locating org.slf4j.impl.StaticLoggerBinder

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • format-2.3.1
    • parquet-format
    • None

    Description

      Parquet-format shades SLF4J to parquet.org.slf4j (see here). This also accidentally shades this line

      private static String STATIC_LOGGER_BINDER_PATH = "org/slf4j/impl/StaticLoggerBinder.class";
      

      to

      private static String STATIC_LOGGER_BINDER_PATH = "parquet/org/slf4j/impl/StaticLoggerBinder.class";
      

      and thus LoggerFactory can never find the correct StaticLoggerBinder implementation even if we provide dependencies like slf4j-log4j12 on the classpath.

      This happens in Spark. Whenever we write a Parquet file, we see the following famous message and can never get rid of it:

      SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
      SLF4J: Defaulting to no-operation (NOP) logger implementation
      SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
      

      Attachments

        Issue Links

          Activity

            People

              rdblue Ryan Blue
              lian cheng Cheng Lian
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: