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

Improve unsupported operations in bridges

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.6.x
    • Fix Version/s: None
    • Component/s: log4j-over-slf4j
    • Labels:
      None
    • Environment:

      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

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

              Dates

              Created:
              Updated: