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

Log4jContextFactory selector discovery logic is not extensible

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0.2
    • Core
    • None

    Description

      I want to write my own LoggerContextFactory which forces my specific instance of ContextSelector and sets some system properties.

      I'd like to extend Log4jContextFactory class to just add this logic and reuse the rest of the code, however that doesn't seem possible since the selector attribute is private and the piece of code that fetches it is embedded in the constructor.

      I think it makes sense to have the selector as a private field, but if the code to fetch it could be a protected one so that it can be overridden, that would enable use cases like this.

      Thanks

      Attachments

        Activity

          People

            rpopma Remko Popma
            mgonzalez Mariano Gonzalez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: