Re: Configuration File and programmatic configuration not working

2019-12-16 Thread Lohith BK
I got it working as per my requirement, well almost. I get an NPE when I try to set the additional fields for the JsonLayout but works when I don't set the them. I went through the source code, I think I am doing it right but may be not. KeyValuePair.Builder kb1 = new KeyValuePair.Builder(

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