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 "Gary Gregory (JIRA)" <ji...@apache.org> on 2016/07/20 16:08:20 UTC

[jira] [Closed] (LOG4J2-1470) Add convenience API Configurator.initializeResource(String, ClassLoader, String)

     [ https://issues.apache.org/jira/browse/LOG4J2-1470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Gregory closed LOG4J2-1470.
--------------------------------
    Resolution: Not A Problem

Awesome, I did not know this API would work with a resource file in a jar file! Cool.

> Add convenience API Configurator.initializeResource(String, ClassLoader, String)
> --------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1470
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1470
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: Configurators
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>             Fix For: 2.7
>
>
> Add convenience API with error checking to replace:
> {code:java}
> final URL url = classLoader.getResource("path/to/a/log4j2-config.xml");
> final LoggerContext context = Configurator.initialize("SomeName", classLoader, url.toURI());
> {code}
> with:
> {code:java}
> final LoggerContext context = Configurator.initializeResource("SomeName", classLoader, "path/to/a/log4j2-config.xml");
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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