Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-167

ClassCastException from SimpleLoggerContext to core.LoggerContext, since it implements spi.LoggerContext

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0-beta5
    • 2.0-beta5
    • Core
    • None

    Description

      When calling Configurator.initialize(<Name>, null, <File>) it calls LogManager.getContext(loader, false) and if no logging implementation can be found this method returns a new SimpleLoggerContext (created by the factory which in turn is created in the static part of the class). This class implements spi.LoggerContext but the Configurator tries to cast it to core.LoggerContext, which fails since SimpleLoggerContext does not extend that class.

      Attachments

        Activity

          People

            rgoers Ralph Goers
            schellhammer Eric Schellhammer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: