It is meant to match this message: https://git1-us-west.apache.org/repos/asf?p=logging-log4j2.git;a=blob;f=log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java;h=8b360a56bbd2e0753146ecc337bd7317756229b0;hb=HEAD#l523
Is it wise to stuff in more information into a status log message? On Wed, Apr 12, 2017 at 6:57 PM, Gary Gregory <[email protected]> wrote: > Hi, > > I think it would help to say what it means for a CF to be inactive vs. > active (and how to change that). > > Gary > ---------- Forwarded message ---------- > From: <[email protected]> > Date: Apr 12, 2017 8:26 AM > Subject: [2/2] logging-log4j2 git commit: LOG4J2-1880 Warn when a > configuration file for an inactive ConfigurationFactory is found > To: <[email protected]> > Cc: > > LOG4J2-1880 Warn when a configuration file for an inactive > > ConfigurationFactory is found > > > > > > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo > > Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/ > > commit/ac88b1be > > Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/ > ac88b1be > > Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/ > ac88b1be > > > > Branch: refs/heads/master > > Commit: ac88b1be4e164768799c388020d388800f5237ce > > Parents: f6f8eb6 > > Author: Mikael Ståldal <[email protected]> > > Authored: Wed Apr 12 17:25:55 2017 +0200 > > Committer: Mikael Ståldal <[email protected]> > > Committed: Wed Apr 12 17:25:55 2017 +0200 > > > > ---------------------------------------------------------------------- > > .../apache/logging/log4j/core/config/ConfigurationFactory.java | 3 > +++ > > .../logging/log4j/core/config/json/JsonConfigurationFactory.java | 2 > +- > > .../logging/log4j/core/config/yaml/YamlConfigurationFactory.java | 2 > +- > > src/changes/changes.xml | 3 > +++ > > 4 files changed, 8 insertions(+), 2 deletions(-) > > ---------------------------------------------------------------------- > > > > > > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ > > ac88b1be/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ > > ConfigurationFactory.java > > ---------------------------------------------------------------------- > > diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/ > > config/ConfigurationFactory.java b/log4j-core/src/main/java/ > > org/apache/logging/log4j/core/config/ConfigurationFactory.java > > index 02bb881..8b360a5 100644 > > --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/ > > config/ConfigurationFactory.java > > +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/ > > config/ConfigurationFactory.java > > @@ -519,6 +519,9 @@ public abstract class ConfigurationFactory extends > > ConfigurationBuilderFactory { > > > > final ConfigurationSource source = > > getInputFromResource(configName, loader); > > if (source != null) { > > + if (!factory.isActive()) { > > + LOGGER.warn("Found configuration file {} for > > inactive ConfigurationFactory {}", configName, > > factory.getClass().getName()); > > + } > > return factory.getConfiguration(loggerContext, > > source); > > } > > } > > > > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ > > ac88b1be/log4j-core/src/main/java/org/apache/logging/log4j/ > > core/config/json/JsonConfigurationFactory.java > > ---------------------------------------------------------------------- > > diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/ > > config/json/JsonConfigurationFactory.java b/log4j-core/src/main/java/ > > org/apache/logging/log4j/core/config/json/JsonConfigurationFactory.java > > index 500fc14..20c957c 100644 > > --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/ > config/json/ > > JsonConfigurationFactory.java > > +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/ > config/json/ > > JsonConfigurationFactory.java > > @@ -44,7 +44,7 @@ public class JsonConfigurationFactory extends > > ConfigurationFactory { > > public JsonConfigurationFactory() { > > for (final String dependency : dependencies) { > > if (!Loader.isClassAvailable(dependency)) { > > - LOGGER.debug("Missing dependencies for Json support"); > > + LOGGER.debug("Missing dependencies for Json support, > > ConfigurationFactory {} is inactive", getClass().getName()); > > isActive = false; > > return; > > } > > > > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ > > ac88b1be/log4j-core/src/main/java/org/apache/logging/log4j/ > > core/config/yaml/YamlConfigurationFactory.java > > ---------------------------------------------------------------------- > > diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/ > > config/yaml/YamlConfigurationFactory.java b/log4j-core/src/main/java/ > > org/apache/logging/log4j/core/config/yaml/YamlConfigurationFactory.java > > index b4beb45..c8f4560 100644 > > --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/ > config/yaml/ > > YamlConfigurationFactory.java > > +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/ > config/yaml/ > > YamlConfigurationFactory.java > > @@ -45,7 +45,7 @@ public class YamlConfigurationFactory extends > > ConfigurationFactory { > > public YamlConfigurationFactory() { > > for (final String dependency : dependencies) { > > if (!Loader.isClassAvailable(dependency)) { > > - LOGGER.debug("Missing dependencies for Yaml support"); > > + LOGGER.debug("Missing dependencies for Yaml support, > > ConfigurationFactory {} is inactive", getClass().getName()); > > isActive = false; > > return; > > } > > > > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ > > ac88b1be/src/changes/changes.xml > > ---------------------------------------------------------------------- > > diff --git a/src/changes/changes.xml b/src/changes/changes.xml > > index 3814847..b2bfacc 100644 > > --- a/src/changes/changes.xml > > +++ b/src/changes/changes.xml > > @@ -31,6 +31,9 @@ > > - "remove" - Removed > > --> > > <release version="2.9.0" date="2017-MM-DD" description="GA Release > > 2.9.0"> > > + <action issue="LOG4J2-1880" dev="mikes" type="add"> > > + Warn when a configuration file for an inactive > > ConfigurationFactory is found. > > + </action> > > <action issue="LOG4J2-1876" dev="mikes" type="fix"> > > More reliable checking for runtime dependencies. > > </action> > > > > > -- [image: MagineTV] *Mikael Ståldal* Senior software developer *Magine TV* [email protected] Grev Turegatan 3 | 114 46 Stockholm, Sweden | www.magine.com Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email.
