Re: Configuration File and programmatic configuration not working

2019-12-13 Thread Lohith BK
Thanks, I suspected the same, however I assumed that "ConfigurationBuilderFactory.newConfigurationBuilder();" is just a convenient way of creating components and adding to the current config. Let me try what you suggested, will update the thread. On Fri, Dec 13, 2019 at 12:10 PM Ralph Goers wrote

Re: Configuration File and programmatic configuration not working

2019-12-13 Thread Ralph Goers
OK. I see that I should have looked at the code in your configuration class more closely. By the time doConfigure() is called the Configuration object has already been created. You are creating a ConfigurationBuilder and building a new Configuration. But the configuration you are building won’t

Re: Configuration File and programmatic configuration not working

2019-12-13 Thread Lohith BK
Yes I did. XmlConfigurationFactory has an order value of 5. @Plugin( name="confplugin", category = "ConfigurationFactory") @Order(6) public class CustomConfigurationFactory extends ConfigurationFactory{ @Override public Configuration getConfiguration(final LoggerContext loggercontext, fi

Re: Configuration File and programmatic configuration not working

2019-12-13 Thread Ralph Goers
Did you also create a CustomConfigurationFactory with an Order value that is larger than the value in XmlConfigurationFactory? Ralph > On Dec 13, 2019, at 11:46 AM, Lohith BK wrote: > > Greetings, > > I have been trying to get the programmatic configuration working (on top of > the file based

Configuration File and programmatic configuration not working

2019-12-13 Thread Lohith BK
Greetings, I have been trying to get the programmatic configuration working (on top of the file based configuration), but it doesn't seem to merge them together. Here is the meat of the plugin code. /tmp/xpose.log gets created, and also the output from the programmatic configuration /tmp/customcon

Betr: Re: JDBCAppender fails to pass connection URL string

2019-12-13 Thread Alban Hertroys
"Gary Gregory" wrote on 2019-12-12 21:54:27: > The more: > > https://github.com/apache/logging-log4j2/tree/release-2.x/log4j- > core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc > > Gary Thanks for the examples, much appreciated. It confirmed that I was probably doing th