Log4j 2
  1. Log4j 2
  2. LOG4J2-730

Log4jContextFactory selector discovery logic is not extensible

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.2
    • Component/s: Core
    • Labels:
      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

        Activity

          People

          • Assignee:
            Remko Popma
            Reporter:
            Mariano Gonzalez
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development