logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot Hale (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1429) Configuration File Include
Date Thu, 16 Jun 2016 16:41:05 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-1429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15334126#comment-15334126

Scot Hale  commented on LOG4J2-1429:

Should bundle resource variables be interpolated when reading the log4j2.component.properties?
 I noticed system ${sys:someSystemProperty} resolves.  But I get an error when using a bundle

2016-06-15 17:44:42,545 main DEBUG Catching java.io.FileNotFoundException: ${bundle:classpathPropertyFileName:log.classpathOverrideConfig}
(No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at org.apache.logging.log4j.core.config.ConfigurationFactory.getInputFromString(ConfigurationFactory.java:335)
	at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:471)
	at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:400)
	at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:257)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:560)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:577)
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:212)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:155)
	at org.apache.logging.log4j.core.LoggerContext.getContext(LoggerContext.java:156)

> Configuration File Include 
> ---------------------------
>                 Key: LOG4J2-1429
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1429
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: Configurators
>            Reporter: Scot Hale 
> Configuration File Include 
> logback has a configuration feature that allows a fragment of a file to be included.
 The file source can be a file, classpath resource, or a URL.  The feature is documented here:
http://logback.qos.ch/manual/configuration.html#fileInclusion .  This requested feature need
not be implemented the same.  Instead of fragments, it would probably be okay to supply a
full configuration and merge it. Either implementation would work for my specific use case.
> Each of the included files should be checked for changes on the monitorInterval to allow
a reload of the configuration.
> Also includes can be considered "optional", which allows the resource to be missing.
> The main use case I have as a requestor, is to create a configuration and package it
in a jar.  The jar is provided to multiple applications which can adjust the logging levels
at runtime for diagnostic purposes with well known included files.

This message was sent by Atlassian JIRA

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

View raw message