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
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
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
working.
> > > >
> > > > BR
> > > > Marvin
> > > >
> > > > -Ursprüngliche Nachricht-
> > > > Von: Ralph Goers [mailto:ralph.go...@dslextreme.com]
> > > > Gesendet: Mittwoch, 29. März 2017 17:46
> >
gt; > "Property", "kafka.host:*9092*"));
> > >
> > > is working.
> > >
> > > BR
> > > Marvin
> > >
> > > -Ursprüngliche Nachricht-
> > > Von: Ralph Goers [mailto:ralph.go...@dslextreme.com]
> > &g
ü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
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.
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
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
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
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
11 matches
Mail list logo