karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Grzybek <gr.grzy...@gmail.com>
Subject Re: [K4.1] Pax Logging: Sift appender
Date Tue, 23 Apr 2019 11:11:17 GMT
Hello

"additivity" is not appender flag - it's flag for logger. You should just
do:

# routing _appender_
log4j2.appender.mdc.type = Routing
log4j2.appender.mdc.name = SiftAppender
log4j2.appender.mdc.routes.type = Routes
log4j2.appender.mdc.routes.pattern = $\\{ctx:bundle.name}
log4j2.appender.mdc.routes.sift.type = Route
...

# _logger_ with routing _appender_ attached
log4j2.logger.camel.name = org.apache.camel
log4j2.logger.camel.level = DEBUG
log4j2.logger.camel.additivity = false
log4j2.logger.camel.appenderRef.SiftAppender.ref = SiftAppender

regards
Grzegorz Grzybek

wt., 23 kwi 2019 o 13:06 Jayamani <jayamanijai92@gmail.com> napisaƂ(a):

> Hi jbonofre,
>  Routing appender works fine....but i am seeing same log content in both
> karaf.log and bundle log file...i just need log contents in bundle log
> alone..
>
> i read some doc about the "additivity"= false - which put log content only
> in bundle log file, how to configure the "additivity" in routing
> appender...
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>

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