Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-850

Switch from log4j to slf4j

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.1
    • 3.4.0
    • java client
    • None
    • Reviewed
    • Hide
      * replaces log4j with slf4j code (also in contrib for bookkeeper, zooinspector,rest,loggraph), added slf4j dependencies into several ivy.xml files
      * you must add slf4j-api-1.6.1.jar and slf4j-log4j12-1.6.1.jar (bridge from sl4j to log4j) to the classpath, if not using the standard scripts
      * log4j remains as the final logger yet, there is still work to do: remove programmatic access to the log4j api from certain classes (which add appenders or configure log4j at runtime), or move them to contrib

      Show
      * replaces log4j with slf4j code (also in contrib for bookkeeper, zooinspector,rest,loggraph), added slf4j dependencies into several ivy.xml files * you must add slf4j-api-1.6.1.jar and slf4j-log4j12-1.6.1.jar (bridge from sl4j to log4j) to the classpath, if not using the standard scripts * log4j remains as the final logger yet, there is still work to do: remove programmatic access to the log4j api from certain classes (which add appenders or configure log4j at runtime), or move them to contrib

    Description

      Hello,

      i would like to see slf4j integrated into the zookeeper instead of relying explicitly on log4j.

      slf4j is an abstract logging framework. There are adapters from slf4j to many logger implementations, one of them is log4j.

      The decision which log engine to use i dont like to make so early.

      This would help me to embed zookeeper in my own applications (which use a different logger implemenation, but slf4j is the basis)

      What do you think?

      (as i can see, those slf4j request flood all other projects on apache as well

      Maybe for 3.4 or 4.0?

      I can offer a patchset, i have experience in such an migration already.

      Attachments

        1. ZOOKEEPER-3.3.1-log4j-slf4j-20101031.patch.bz2
          15 kB
          Olaf Krische
        2. ZOOKEEPER-3.4.0-log4j-slf4j-20101102.patch.bz2
          20 kB
          Olaf Krische
        3. ZOOKEEPER-850.patch
          206 kB
          Olaf Krische
        4. ZOOKEEPER-850.patch
          206 kB
          Michi Mutsuzaki
        5. ZOOKEEPER-850.patch
          203 kB
          Michi Mutsuzaki
        6. ZOOKEEPER-850.patch
          203 kB
          Patrick D. Hunt

        Issue Links

          Activity

            People

              public@ecopatz.de Olaf Krische
              public@ecopatz.de Olaf Krische
              Votes:
              10 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: