Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-13961

Safe castings to logback classes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Duplicate
    • None
    • None

    Description

      While working in an SBT plugin for I faced the problem: the system was injecting in the classpath the log4j implementation for SLF4J. This caused a ClassCastException in the startup process.

      Cassandra uses logback but IMHO we shouldn't fail at runtime if SLF4J loads another implementation. Ideally, we should allow the users to choose their favourite implementation.

      I've attached a patch that adds a instanceof checkings before casting the logback classes.

      Thanks.

      Attachments

        1. LogbackPatch.patch
          9 kB
          Federico Fernández

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fedefernandez Federico Fernández
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: