logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: Custom appender : PluginElement
Date Sat, 30 Aug 2014 19:03:11 GMT
Good to hear it! Is there anything about the documentation you found
unclear in that regard?


On 30 August 2014 01:44, lb <lburgazzoli@gmail.com> wrote:

> Yes that was the problem, I forgot to mark it as plugin. Now it works,
> thank you
>
> On Friday, August 29, 2014, Matt Sicker <boards@gmail.com> wrote:
>
> > Is VanillaLogAppenderConfig also marked as a @Plugin and everything?
> >
> >
> > On 28 August 2014 05:13, lb <lburgazzoli@gmail.com <javascript:;>>
> wrote:
> >
> > > I'm writing a custom appender and I have a problem setting up
> > > PluginElement:
> > >
> > > The xml definition is the following one:
> > >
> > >  <BinaryVanillaChronicle name="CONF-BINARY-VANILLA-CHRONICLE">
> > >
> > >
> > >
> >
> <path>${sys:java.io.tmpdir}/chronology-log4j2/conf-binary-vanilla-chronicle</path>
> > >     <formatMessage>false</formatMessage>
> > >     <includeCallerData>false</includeCallerData>
> > >
> >  <includeMappedDiagnosticContext>false</includeMappedDiagnosticContext>
> > >     <chronicleConfig>
> > >         <dataCacheCapacity>128</dataCacheCapacity>
> > >     </chronicleConfig>
> > > </BinaryVanillaChronicle>
> > >
> > > And the PluginFactory method is:
> > > @PluginFactory
> > > public static BinaryVanillaChronicleAppender createAppender(
> > >     @PluginAttribute("name") final String name,
> > >     @PluginAttribute("path") final String path,
> > >     @PluginAttribute("formatMessage") final String formatMessage,
> > >     @PluginAttribute("includeCallerData") final String
> includeCallerData,
> > >     @PluginAttribute("includeMappedDiagnosticContext") final String
> > > includeMappedDiagnosticContext,
> > >     @PluginElement("chronicleConfig") final VanillaLogAppenderConfig
> > > chronicleConfig,
> > >     @PluginElement("filters") final Filter filter)
> > >
> > > When I run it, I have the following messages:
> > > 2014-08-28 12:12:29,247 ERROR appenders contains an invalid element or
> > > attribute "BinaryVanillaChronicle"
> > > 2014-08-28 12:12:29,267 ERROR Unable to locate appender
> > > BINARY-VANILLA-CHRONICLE for logger binary-vanilla-chronicle
> > > 2014-08-28 12:12:29,268 ERROR Unable to locate appender
> > > BINARY-VANILLA-CHRONICLE-FMT for logger binary-vanilla-chronicle-fmt
> > > 2014-08-28 12:12:29,268 ERROR Unable to locate appender
> > > PERF-BINARY-VANILLA-CHRONICLE for logger perf-binary-vanilla-chronicle
> > >
> > > The full code is on
> > >
> > >
> >
> https://github.com/lburgazzoli/Chronicle-Logger/tree/HFT-CLOG-12/logger-log4j-2
> > >
> > > What's wrong with my setup?
> > >
> >
> >
> >
> > --
> > Matt Sicker <boards@gmail.com <javascript:;>>
> >
>



-- 
Matt Sicker <boards@gmail.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message