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

Improve unsupported operations in bridges

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • None
    • 1.6.x
    • log4j-over-slf4j
    • None
    • Operating System: All
      Platform: PC

    Description

      I tried to use log4j-over-slf4j in a legacy project that provides its own LoggerFactory and when I use log4j-over-slf4j I get for example a java.lang.NoSuchMethodError for Logger getLogger(String name, LoggerFactory factory).

      Indeed, it seems that log4j-over-slf4j does no support this method. However, I think it would be nice to provide all the methods that are exposed by the public log4j API and to throw for example an exception like an UnsupportedOperationException (with a description message) when the method is not yet implemented. First, to know (with a clear message) that the bridge does not support these methods without having to check into the source code in order to see whether the method is provided or not. But also to help the developers to know what are the methods they have to implement without making a diff between the log4j and the log4j-over-slf4j source code.

      Maybe this concept can be applied for all the bridge.

      Attachments

        Activity

          People

            slf4j-dev SLF4J developers list
            laurent.pellegrino@gmail.com laurent.pellegrino
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: