karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: [K4.1] Pax Logging: Sift appender
Date Wed, 27 Mar 2019 14:35:55 GMT
Hi,

Here's an example of MDC with Camel:

log4j2.rootLogger.appenderRef.camel.ref = camel

log4j2.appender.camel.type = Routing
log4j2.appender.camel.name = Camel
log4j2.appender.camel.routes.type = Routes
log4j2.appender.camel.routes.pattern = $$\\{ctx:context.routeId\\}
log4j2.appender.camel.routes.context.type = Route
log4j2.appender.camel.routes.context.rolling.type = RollingFile
log4j2.appender.camel.routes.context.rolling.name =
camel-$\\{ctx:context.routeId\\}
log4j2.appender.camel.routes.context.rolling.layout.type = PatternLayout
log4j2.appender.camel.routes.context.rolling.layout.pattern =
${log4j2.patternCamel}
log4j2.appender.camel.routes.context.rolling.fileName =
${karaf.data}/log/camel-$\\{ctx:context.routeId\\}.log
log4j2.appender.camel.routes.context.rolling.filePattern=
${karaf.data}/log/camel-$\\{ctx:context.routeId\\}.log.%i
log4j2.appender.camel.routes.context.rolling.policies.type = Policies
log4j2.appender.camel.routes.context.rolling.policies.size.type =
SizeBasedTriggeringPolicy
log4j2.appender.camel.routes.context.rolling.policies.size.size = 20MB

Regards
KB

On 27/03/2019 15:18, Jayamani wrote:
> Thanks Grzegorz, i will try with mdc.
> 
> i am not getting the whole picture of this shift appender and mdc in
> log4j2...if anyone know how to config pax logging in karaf 4.2.3 to create
> separate log file for each bundle, please share complete
> org.ops4j.pax.logging.cfg file.
> 
> Thanks in advance.
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message