You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Mariano Gonzalez (JIRA)" <ji...@apache.org> on 2014/07/22 20:26:45 UTC

[jira] [Created] (LOG4J2-730) Log4jContextFactory selector discovery logic is not extensible

Mariano Gonzalez created LOG4J2-730:
---------------------------------------

             Summary: Log4jContextFactory selector discovery logic is not extensible
                 Key: LOG4J2-730
                 URL: https://issues.apache.org/jira/browse/LOG4J2-730
             Project: Log4j 2
          Issue Type: Improvement
          Components: Core
    Affects Versions: 2.0
            Reporter: Mariano Gonzalez


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



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org