Re: Kafka Appender with Programmatic Configuration

2017-04-05 Thread Ralph Goers
Probably not without making a specific class to support it. As I said previously, the raw component methods are there so that they can configure anything. All the specific classes and methods do is hide that in a more user friendly interface. Ralph > On Apr 5, 2017, at 7:04 AM, Mikael Ståldal

Re: Kafka Appender with Programmatic Configuration

2017-04-05 Thread Mikael Ståldal
It works to do it like this: gelfBuilder.addComponent(builder.newComponent("KeyValuePair").addAttribute( "key", "foo").addAttribute("value", "bar")); Is there no simpler way to do it? On Wed, Apr 5, 2017 at 2:01 PM, Mikael Ståldal wrote: > But how do you do this for KeyValuePair? > > When I do

Re: Kafka Appender with Programmatic Configuration

2017-04-05 Thread Mikael Ståldal
But how do you do this for KeyValuePair? When I do: LayoutComponentBuilder gelfBuilder = builder.newLayout("GelfLayout"); gelfBuilder.addAttribute("host", "myself"); gelfBuilder.addComponent(builder.newComponent("foo", "KeyValuePair", "bar")); it doesn't work and I get this error message: ERROR

Re: Kafka Appender with Programmatic Configuration

2017-03-31 Thread Mikael Ståldal
working. > > > > > > > > BR > > > > Marvin > > > > > > > > -Ursprüngliche Nachricht- > > > > Von: Ralph Goers [mailto:ralph.go...@dslextreme.com] > > > > Gesendet: Mittwoch, 29. März 2017 17:46 > >

Re: Kafka Appender with Programmatic Configuration

2017-03-30 Thread Matt Sicker
gt; > "Property", "kafka.host:*9092*")); > > > > > > is working. > > > > > > BR > > > Marvin > > > > > > -Ursprüngliche Nachricht- > > > Von: Ralph Goers [mailto:ralph.go...@dslextreme.com] > > &g

Re: Kafka Appender with Programmatic Configuration

2017-03-30 Thread Mikael Ståldal
üngliche Nachricht- > > Von: Ralph Goers [mailto:ralph.go...@dslextreme.com] > > Gesendet: Mittwoch, 29. März 2017 17:46 > > An: Log4J Users List > > Betreff: Re: Kafka Appender with Programmatic Configuration > > > > Mikael’s solution is correct. Every item

Re: Kafka Appender with Programmatic Configuration

2017-03-29 Thread Matt Sicker
ing. > > BR > Marvin > > -Ursprüngliche Nachricht- > Von: Ralph Goers [mailto:ralph.go...@dslextreme.com] > Gesendet: Mittwoch, 29. März 2017 17:46 > An: Log4J Users List > Betreff: Re: Kafka Appender with Programmatic Configuration > > Mikael’s solution is correct.

Re: Kafka Appender with Programmatic Configuration

2017-03-29 Thread Ralph Goers
Mikael’s solution is correct. Every item in the ConfigurationBuilder is a Component. We have “special” Components for things that are always used, such as Loggers and Appenders. But we can’t know about every type of Component so in those cases you just use the generic Component. Ralph > On Mar

Re: Kafka Appender with Programmatic Configuration

2017-03-29 Thread Mikael Ståldal
But it would be nice to have a simpler way to do that. On Wed, Mar 29, 2017 at 5:28 PM, Mikael Ståldal wrote: > Have you tried this: > > kafkaBuilder.addComponent(builder.newComponent("bootstrap.servers", > "Property", "kafka.host:*9092*")); > > > On Wed, Mar 29, 2017 at 5:26 PM, Matt Sicker w

Re: Kafka Appender with Programmatic Configuration

2017-03-29 Thread Mikael Ståldal
Have you tried this: kafkaBuilder.addComponent(builder.newComponent("bootstrap.servers", "Property", "kafka.host:*9092*")); On Wed, Mar 29, 2017 at 5:26 PM, Matt Sicker wrote: > Looks like a bug to me! Here's the issue: a Properties component is > injected into a kafka appender, but there is n

Re: Kafka Appender with Programmatic Configuration

2017-03-29 Thread Matt Sicker
Looks like a bug to me! Here's the issue: a Properties component is injected into a kafka appender, but there is no way to create a Property or Properties component directly via the configuration builder API. The top level properties aren't injected in the kafka appender (and manager), so they're u