What you need to know is that with the ConfigurationBuilder everything is 
really a Component. Since Layouts, Appenders, Filters and Loggers are so common 
we have built specialized ComponentBuilders for them, but they could also be 
constructed with a generic ComponentBuilder. 
https://logging.apache.org/log4j/2.x/manual/customconfig.html 
<https://logging.apache.org/log4j/2.x/manual/customconfig.html> provides some 
examples that show creating triggering policies using the generic 
ComponentBuilder. You can use that as a guide to help you figure out how to 
construct your routes.

Ralph

> On Nov 27, 2017, at 9:29 AM, Jens Schmidt <schm...@iils.de> wrote:
> 
> 
> Hello there,
> 
> getting accustomed with log4j 2. It is awesome so far. However, i can't 
> figure out how to create a routing logger with the ConfigurationBuilder API. 
> I came this far:
> AppenderComponentBuilder routingAppender = builder.newAppender("Routing", 
> "Routing");
> 
> And then what, how do you configure the <Routes> and each <Route>?
> Some input would be greatly appreciated!
> 
> Also, the OutputStreamAppender's Builder seems to be missing a few 
> annotations (@PluginBuilderAttribute & @Required), compared to the one in 
> ConsoleAppender.
> 
> Best regards
> Jens Schmidt
> 
> -- 
> Dipl.-Ing. Jens Schmidt
> Telefon: 0711/217-24901-2
> Email: schm...@iils.de
> 
> IILS Ingenieurgesellschaft für Intelligente Lösungen und Systeme mbH
> Albstrasse 6, D-72818 Trochtelfingen-Steinhilben
> Geschäftsführer Dipl.-Ing. Peter Arnold und Dipl.-Ing. Roland Weil
> USt-IDNr.: DE 203557532
> Registergericht: Amtsgericht Stuttgart
> Handelsregister: Ingenieurkammer Baden-Württemberg HRB 20422
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
> 

Reply via email to