Re: Configuring MDC logging karaf 4 camel 3.7.0
Hi Thanks for sharing. It should work anyway without default as soon as you have a context available. Regards JB > Le 7 mai 2021 à 11:17, michael e a écrit : > > Finally using default value fix the situation > > \$\\\{ctx:camel.contextId:-default\} > > interesting doc: > https://ops4j1.jira.com/wiki/spaces/paxlogging/pages/499613746/Configuring+Log4J2 > > <https://ops4j1.jira.com/wiki/spaces/paxlogging/pages/499613746/Configuring+Log4J2> > > Thanks > Michael. > > De : michael e mailto:michaelel...@outlook.fr>> > Envoyé : jeudi 6 mai 2021 17:23 > À : user mailto:user@karaf.apache.org>> > Objet : RE: Configuring MDC logging karaf 4 camel 3.7.0 > > Hello All, > > I still have bugs (by the way is terribly complex configuration with no clear > documentation). > Here my configuration > > log4j2.appender.sift.type = Routing > log4j2.appender.sift.name = Routing > log4j2.appender.sift.routes.type = Routes > log4j2.appender.sift.routes.pattern = \$\$\\\{ctx:camel.contextId\} > log4j2.appender.sift.routes.bundle.type = Route > log4j2.appender.sift.routes.bundle.appender.type = RollingRandomAccessFile > log4j2.appender.sift.routes.bundle.appender.name = > Bundle-\$\\\{ctx:camel.contextId\} > log4j2.appender.sift.routes.bundle.appender.fileName = > ${karaf.log}/bundle-\$\\\{ctx:camel.contextId\}.log > log4j2.appender.sift.routes.bundle.appender.filePattern = > ${karaf.log}/bundle-\$\\\{ctx:camel.contextId\}.log.%i > log4j2.appender.sift.routes.bundle.appender.append = true > log4j2.appender.sift.routes.bundle.appender.layout.type = PatternLayout > log4j2.appender.sift.routes.bundle.appender.layout.pattern = ${log4j2.pattern} > log4j2.appender.sift.routes.bundle.appender.policies.type = Policies > log4j2.appender.sift.routes.bundle.appender.policies.size.type = > SizeBasedTriggeringPolicy > log4j2.appender.sift.routes.bundle.appender.policies.size.size = 8MB > > The problem is at startup and shutdown all bundle that doesn't have > camelContext cause this errors > ... > e-${ctx:camel.contextId:bundle.name}.log] with data > [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@74c3f4fd] > org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to invoke > factory method in class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for > element RollingRandomAccessFile: java.lang.IllegalStateException: No factory > method found for class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender > org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Cannot access > RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de > répertoire ou de volume est incorrecte > org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Could not create > plugin of type class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for > element RollingRandomAccessFile: java.lang.IllegalStateException: > ManagerFactory > [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@69cf227a] > unable to create manager for > [D:\karaf\apache-karaf-4.3.1\data\log/bundle-${ctx:camel.contextId:bundle.name}.log] > with data > [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@59ab51cc] > org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to invoke > factory method in class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for > element RollingRandomAccessFile: java.lang.IllegalStateException: No factory > method found for class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender > > > My question is how i can provide default key or something like to avoid this > errors in my karaf ? > Michael. > > De : michael e > Envoyé : vendredi 22 janvier 2021 15:16 > À : user > Objet : RE: Configuring MDC logging karaf 4 camel 3.7.0 > > Hi JB, > > I confirm, (for testing you can use my desktop). > > Regards, > Michael. > > De : Jean-Baptiste Onofre > Envoyé : vendredi 22 janvier 2021 06:09 > À : user > Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 > > Hi Michael, > > I’ve resumed my test about Camel MDC. > > So, I created a simple route like this: > > > http://www.osgi.org/xmlns/blueprint/v1.0.0 > <http://www.osgi.org/xmlns/blueprint/v1.0.0>"> > > http://camel.apache.org/schema/blueprint > <http://camel.apache.org/schema/blueprint>" useMDCLogging="true"> > > > Hello World >
RE: Configuring MDC logging karaf 4 camel 3.7.0
Finally using default value fix the situation \$\\\{ctx:camel.contextId:-default\} interesting doc: https://ops4j1.jira.com/wiki/spaces/paxlogging/pages/499613746/Configuring+Log4J2 Thanks Michael. De : michael e Envoyé : jeudi 6 mai 2021 17:23 À : user Objet : RE: Configuring MDC logging karaf 4 camel 3.7.0 Hello All, I still have bugs (by the way is terribly complex configuration with no clear documentation). Here my configuration log4j2.appender.sift.type = Routing log4j2.appender.sift.name = Routing log4j2.appender.sift.routes.type = Routes log4j2.appender.sift.routes.pattern = \$\$\\\{ctx:camel.contextId\} log4j2.appender.sift.routes.bundle.type = Route log4j2.appender.sift.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.sift.routes.bundle.appender.name = Bundle-\$\\\{ctx:camel.contextId\} log4j2.appender.sift.routes.bundle.appender.fileName = ${karaf.log}/bundle-\$\\\{ctx:camel.contextId\}.log log4j2.appender.sift.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:camel.contextId\}.log.%i log4j2.appender.sift.routes.bundle.appender.append = true log4j2.appender.sift.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.sift.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.sift.routes.bundle.appender.policies.type = Policies log4j2.appender.sift.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.sift.routes.bundle.appender.policies.size.size = 8MB The problem is at startup and shutdown all bundle that doesn't have camelContext cause this errors ... e-${ctx:camel.contextId:bundle.name}.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@74c3f4fd] org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@69cf227a] unable to create manager for [D:\karaf\apache-karaf-4.3.1\data\log/bundle-${ctx:camel.contextId:bundle.name}.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@59ab51cc] org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender My question is how i can provide default key or something like to avoid this errors in my karaf ? Michael. De : michael e Envoyé : vendredi 22 janvier 2021 15:16 À : user Objet : RE: Configuring MDC logging karaf 4 camel 3.7.0 Hi JB, I confirm, (for testing you can use my desktop). Regards, Michael. De : Jean-Baptiste Onofre Envoyé : vendredi 22 janvier 2021 06:09 À : user Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi Michael, I’ve resumed my test about Camel MDC. So, I created a simple route like this: http://www.osgi.org/xmlns/blueprint/v1.0.0;> http://camel.apache.org/schema/blueprint; useMDCLogging="true"> Hello World Then, in etc/org.ops4j.pax.logging.cfg, I added: log4j2.rootLogger.appenderRef.Sift.ref = Routing … log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = ${karaf.log}/camel-context-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pat
RE: Configuring MDC logging karaf 4 camel 3.7.0
Hello All, I still have bugs (by the way is terribly complex configuration with no clear documentation). Here my configuration log4j2.appender.sift.type = Routing log4j2.appender.sift.name = Routing log4j2.appender.sift.routes.type = Routes log4j2.appender.sift.routes.pattern = \$\$\\\{ctx:camel.contextId\} log4j2.appender.sift.routes.bundle.type = Route log4j2.appender.sift.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.sift.routes.bundle.appender.name = Bundle-\$\\\{ctx:camel.contextId\} log4j2.appender.sift.routes.bundle.appender.fileName = ${karaf.log}/bundle-\$\\\{ctx:camel.contextId\}.log log4j2.appender.sift.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:camel.contextId\}.log.%i log4j2.appender.sift.routes.bundle.appender.append = true log4j2.appender.sift.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.sift.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.sift.routes.bundle.appender.policies.type = Policies log4j2.appender.sift.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.sift.routes.bundle.appender.policies.size.size = 8MB The problem is at startup and shutdown all bundle that doesn't have camelContext cause this errors ... e-${ctx:camel.contextId:bundle.name}.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@74c3f4fd] org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@69cf227a] unable to create manager for [D:\karaf\apache-karaf-4.3.1\data\log/bundle-${ctx:camel.contextId:bundle.name}.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@59ab51cc] org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender My question is how i can provide default key or something like to avoid this errors in my karaf ? Michael. De : michael e Envoyé : vendredi 22 janvier 2021 15:16 À : user Objet : RE: Configuring MDC logging karaf 4 camel 3.7.0 Hi JB, I confirm, (for testing you can use my desktop). Regards, Michael. De : Jean-Baptiste Onofre Envoyé : vendredi 22 janvier 2021 06:09 À : user Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi Michael, I’ve resumed my test about Camel MDC. So, I created a simple route like this: http://www.osgi.org/xmlns/blueprint/v1.0.0;> http://camel.apache.org/schema/blueprint; useMDCLogging="true"> Hello World Then, in etc/org.ops4j.pax.logging.cfg, I added: log4j2.rootLogger.appenderRef.Sift.ref = Routing … log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = ${karaf.log}/camel-context-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB You can see the fileName containing camel.contextId. In data/log, I can see the log fil
Re: Configuring MDC logging karaf 4 camel 3.7.0
Total 1 routes, of which 1 are started >> 2021-01-22T06:07:29,004 | INFO | Blueprint Event Dispatcher: 1 | >> AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - >> 3.7.0 | Apache Camel 3.7.0 (camel-1) started in 112ms >> 2021-01-22T06:07:30,017 | INFO | Camel (camel-1) thread #1 - timer://fire >> <> | test | 63 - org.apache.camel.camel-api - >> 3.7.0 | Exchange[ExchangePattern: InOnly, BodyType: String, Body: Hello >> World] >> >> So, all good. >> >> Can you confirm that if you use this on your machine it doesn’t work ? >> >> I’m looking for a Windows VM to test. >> >> Regards >> JB >> >>> Le 21 janv. 2021 à 10:31, michael e >> <mailto:michaelel...@outlook.fr>> a écrit : >>> >>> Hello JB, >>> >>> Any news or fix ? >>> >>> Thanks regards, >>> Michael. >>> >>> De : Jean-Baptiste Onofre mailto:j...@nanthrax.net>> >>> Envoyé : jeudi 14 janvier 2021 10:16 >>> À : user mailto:user@karaf.apache.org>> >>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >>> >>> Oh my bad, I completely forget the Windows test ;) >>> >>> I will do it just after AMQ release. For the tracking I will create a Jira. >>> >>> I’m very sorry. >>> >>> Regards >>> JB >>> >>>> Le 14 janv. 2021 à 10:03, michael e >>> <mailto:michaelel...@outlook.fr>> a écrit : >>>> >>>> Hi JB, >>>> >>>> Any news about this ? >>>> >>>> Regards, >>>> Michael. >>>> >>>> De : Jean-Baptiste Onofre mailto:j...@nanthrax.net>> >>>> Envoyé : mercredi 6 janvier 2021 17:21 >>>> À : user@karaf.apache.org <mailto:user@karaf.apache.org> >>>> mailto:user@karaf.apache.org>> >>>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >>>> >>>> Hi Michael, >>>> >>>> Happy new year too ! >>>> >>>> I forgot during end of year vacation. I’m busy with ActiveMQ release >>>> preparation now, but I will switch back to test on Windows tomorrow. >>>> >>>> Regards >>>> JB >>>> >>>>> Le 6 janv. 2021 à 17:07, michael e >>>> <mailto:michaelel...@outlook.fr>> a écrit : >>>>> >>>>> Hello JB, >>>>> >>>>> Happy new year, any news about this ? >>>>> >>>>> Thanks, >>>>> Michael. >>>>> >>>>> De : JB Onofré mailto:j...@nanthrax.net>> >>>>> Envoyé : jeudi 24 décembre 2020 17:00 >>>>> À : user@karaf.apache.org <mailto:user@karaf.apache.org> >>>>> mailto:user@karaf.apache.org>> >>>>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >>>>> >>>>> I would consider as a big if I have the error on Windows. >>>>> >>>>> I’m suspecting an issue on Windows only (I hate this os ;) ). >>>>> >>>>> Let me setup a vm (just need time). >>>>> >>>>> Regard >>>>> JB >>>>> >>>>>> Le 24 déc. 2020 à 16:36, michael e >>>>> <mailto:michaelel...@outlook.fr>> a écrit : >>>>>> >>>>>> >>>>>> Ok thanks so is a bug ? Or i just have to change something ? (This is >>>>>> the provided configuration i didn't change anythin expect fileName >>>>>> pattern) >>>>>> >>>>>> Regards, >>>>>> Michael. >>>>>> >>>>>> De : JB Onofré mailto:j...@nanthrax.net>> >>>>>> Envoyé : jeudi 24 décembre 2020 16:23 >>>>>> À : user@karaf.apache.org <mailto:user@karaf.apache.org> >>>>>> mailto:user@karaf.apache.org>> >>>>>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >>>>>> >>>>>> Understood. I don’t have any error. The error you have seems related to >>>>>> the rolling file configuration. >>>>>> >>>>>> Regards >>>>>> JB >>>>>> >>>>>>> Le 24 déc. 2020 à 15:16, michael e >>>>>> <mailto:michael
RE: Configuring MDC logging karaf 4 camel 3.7.0
Hi JB, I confirm, (for testing you can use my desktop). Regards, Michael. De : Jean-Baptiste Onofre Envoyé : vendredi 22 janvier 2021 06:09 À : user Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi Michael, I’ve resumed my test about Camel MDC. So, I created a simple route like this: http://www.osgi.org/xmlns/blueprint/v1.0.0;> http://camel.apache.org/schema/blueprint; useMDCLogging="true"> Hello World Then, in etc/org.ops4j.pax.logging.cfg, I added: log4j2.rootLogger.appenderRef.Sift.ref = Routing … log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = ${karaf.log}/camel-context-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB You can see the fileName containing camel.contextId. In data/log, I can see the log file created for my Camel Context: camel-context-camel-1.log containing: 2021-01-22T06:07:28,801 | INFO | Blueprint Event Dispatcher: 1 | JmxManagementStrategy| 88 - org.apache.camel.camel-management - 3.7.0 | JMX is enabled 2021-01-22T06:07:28,890 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - 3.7.0 | Apache Camel 3.7.0 (camel-1) is starting 2021-01-22T06:07:28,892 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - 3.7.0 | MDC logging is enabled on CamelContext: camel-1 2021-01-22T06:07:28,968 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - 3.7.0 | StreamCaching is not in use. If using streams then it's recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html 2021-01-22T06:07:28,998 | INFO | Blueprint Event Dispatcher: 1 | InternalRouteStartupManager | 65 - org.apache.camel.camel-base-engine - 3.7.0 | Route: test started and consuming from: timer://fire 2021-01-22T06:07:29,003 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - 3.7.0 | Total 1 routes, of which 1 are started 2021-01-22T06:07:29,004 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - 3.7.0 | Apache Camel 3.7.0 (camel-1) started in 112ms 2021-01-22T06:07:30,017 | INFO | Camel (camel-1) thread #1 - timer://fire | test | 63 - org.apache.camel.camel-api - 3.7.0 | Exchange[ExchangePattern: InOnly, BodyType: String, Body: Hello World] So, all good. Can you confirm that if you use this on your machine it doesn’t work ? I’m looking for a Windows VM to test. Regards JB Le 21 janv. 2021 à 10:31, michael e mailto:michaelel...@outlook.fr>> a écrit : Hello JB, Any news or fix ? Thanks regards, Michael. De : Jean-Baptiste Onofre mailto:j...@nanthrax.net>> Envoyé : jeudi 14 janvier 2021 10:16 À : user mailto:user@karaf.apache.org>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Oh my bad, I completely forget the Windows test ;) I will do it just after AMQ release. For the tracking I will create a Jira. I’m very sorry. Regards JB Le 14 janv. 2021 à 10:03, michael e mailto:michaelel...@outlook.fr>> a écrit : Hi JB, Any news about this ? Regards, Michael. De : Jean-Baptiste Onofre mailto:j...@nanthrax.net>> Envoyé : mercredi 6 janvier 2021 17:21 À : user@karaf.apache.org<mailto:user@karaf.apache.org> mailto:user@karaf.apache.org>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi Michael, Happy new year too ! I forgot during end of year vacation. I’m busy with ActiveMQ release preparation now, but I will switch back to test on Windows tomorrow. Regards JB Le 6 janv. 2021 à 17:07, michael e mailto:michaelel...@outlook.fr>> a écrit : Hello JB, Happy new year, any news about this ? Th
Re: Configuring MDC logging karaf 4 camel 3.7.0
Hi Oleg, The file name ${ctx:camel.contextId}.log is "normal" as it’s created before the first camel context is created. We can set additivity false or exclude "no context" in the sift appender. Regards JB > Le 22 janv. 2021 à 14:54, Oleg Cohen a écrit : > > Hi JB, > > I am also interested in this functionality and I have tried the same on a > Mac. All worked good for me, but I see a file created > camel-context-${ctx:camel.contextId}.log in the data/log folder that contains > the entire duplicate log. Same as karaf.log. Have you observed the same? > > Than you, > Oleg > > On Fri, Jan 22, 2021 at 12:09 AM Jean-Baptiste Onofre <mailto:j...@nanthrax.net>> wrote: > Hi Michael, > > I’ve resumed my test about Camel MDC. > > So, I created a simple route like this: > > > http://www.osgi.org/xmlns/blueprint/v1.0.0 > <http://www.osgi.org/xmlns/blueprint/v1.0.0>"> > > http://camel.apache.org/schema/blueprint > <http://camel.apache.org/schema/blueprint>" useMDCLogging="true"> > > > Hello World > > > > > > > Then, in etc/org.ops4j.pax.logging.cfg, I added: > > log4j2.rootLogger.appenderRef.Sift.ref = Routing > > … > > log4j2.appender.routing.type = Routing > log4j2.appender.routing.name <http://log4j2.appender.routing.name/> = Routing > log4j2.appender.routing.routes.type = Routes > log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name > <http://bundle.name/>\} > log4j2.appender.routing.routes.bundle.type = Route > log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile > log4j2.appender.routing.routes.bundle.appender.name > <http://log4j2.appender.routing.routes.bundle.appender.name/> = > Bundle-\$\\\{ctx:bundle.name <http://bundle.name/>\} > log4j2.appender.routing.routes.bundle.appender.fileName = > ${karaf.log}/camel-context-\$\\\{ctx:camel.contextId\}.log > log4j2.appender.routing.routes.bundle.appender.filePattern = > ${karaf.log}/bundle-\$\\\{ctx:bundle.name <http://bundle.name/>\}.log.%i > log4j2.appender.routing.routes.bundle.appender.append = true > log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout > log4j2.appender.routing.routes.bundle.appender.layout.pattern = > ${log4j2.pattern} > log4j2.appender.routing.routes.bundle.appender.policies.type = Policies > log4j2.appender.routing.routes.bundle.appender.policies.size.type = > SizeBasedTriggeringPolicy > log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB > > You can see the fileName containing camel.contextId. > > In data/log, I can see the log file created for my Camel Context: > camel-context-camel-1.log containing: > > 2021-01-22T06:07:28,801 | INFO | Blueprint Event Dispatcher: 1 | > JmxManagementStrategy| 88 - org.apache.camel.camel-management - > 3.7.0 | JMX is enabled > 2021-01-22T06:07:28,890 | INFO | Blueprint Event Dispatcher: 1 | > AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - > 3.7.0 | Apache Camel 3.7.0 (camel-1) is starting > 2021-01-22T06:07:28,892 | INFO | Blueprint Event Dispatcher: 1 | > AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - > 3.7.0 | MDC logging is enabled on CamelContext: camel-1 > 2021-01-22T06:07:28,968 | INFO | Blueprint Event Dispatcher: 1 | > AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - > 3.7.0 | StreamCaching is not in use. If using streams then it's recommended > to enable stream caching. See more details at > http://camel.apache.org/stream-caching.html > <http://camel.apache.org/stream-caching.html> > 2021-01-22T06:07:28,998 | INFO | Blueprint Event Dispatcher: 1 | > InternalRouteStartupManager | 65 - org.apache.camel.camel-base-engine - > 3.7.0 | Route: test started and consuming from: timer://fire <> > 2021-01-22T06:07:29,003 | INFO | Blueprint Event Dispatcher: 1 | > AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - > 3.7.0 | Total 1 routes, of which 1 are started > 2021-01-22T06:07:29,004 | INFO | Blueprint Event Dispatcher: 1 | > AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - > 3.7.0 | Apache Camel 3.7.0 (camel-1) started in 112ms > 2021-01-22T06:07:30,017 | INFO | Camel (camel-1) thread #1 - timer://fire <> > | test | 63 - org.apache.camel.camel-api - 3.7.0 > | Exchange[ExchangePattern: InOnly, BodyType: String, Body: Hello World] > > So, all good. > > Can you confirm that if you use this on your machine it doesn’t work ? > > I’m
Re: Configuring MDC logging karaf 4 camel 3.7.0
Hi JB, I am also interested in this functionality and I have tried the same on a Mac. All worked good for me, but I see a file created camel-context-${ctx:camel.contextId}.log in the data/log folder that contains the entire duplicate log. Same as karaf.log. Have you observed the same? Than you, Oleg On Fri, Jan 22, 2021 at 12:09 AM Jean-Baptiste Onofre wrote: > Hi Michael, > > I’ve resumed my test about Camel MDC. > > So, I created a simple route like this: > > > http://www.osgi.org/xmlns/blueprint/v1.0.0;> > > http://camel.apache.org/schema/blueprint; > useMDCLogging="true"> > > > Hello World > > > > > > > Then, in etc/org.ops4j.pax.logging.cfg, I added: > > log4j2.rootLogger.appenderRef.Sift.ref = Routing > > … > > log4j2.appender.routing.type = Routing > log4j2.appender.routing.name = Routing > log4j2.appender.routing.routes.type = Routes > log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} > log4j2.appender.routing.routes.bundle.type = Route > log4j2.appender.routing.routes.bundle.appender.type > = RollingRandomAccessFile > log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx: > bundle.name\} > log4j2.appender.routing.routes.bundle.appender.fileName > = ${karaf.log}/camel-context-\$\\\{ctx:camel.contextId\}.log > log4j2.appender.routing.routes.bundle.appender.filePattern > = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i > log4j2.appender.routing.routes.bundle.appender.append = true > log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout > log4j2.appender.routing.routes.bundle.appender.layout.pattern > = ${log4j2.pattern} > log4j2.appender.routing.routes.bundle.appender.policies.type = Policies > log4j2.appender.routing.routes.bundle.appender.policies.size.type > = SizeBasedTriggeringPolicy > log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB > > You can see the fileName containing camel.contextId. > > In data/log, I can see the log file created for my Camel > Context: camel-context-camel-1.log containing: > > 2021-01-22T06:07:28,801 | INFO | Blueprint Event Dispatcher: 1 | > JmxManagementStrategy| 88 - org.apache.camel.camel-management - > 3.7.0 | JMX is enabled > 2021-01-22T06:07:28,890 | INFO | Blueprint Event Dispatcher: 1 | > AbstractCamelContext | 65 - org.apache.camel.camel-base-engine > - 3.7.0 | Apache Camel 3.7.0 (camel-1) is starting > 2021-01-22T06:07:28,892 | INFO | Blueprint Event Dispatcher: 1 | > AbstractCamelContext | 65 - org.apache.camel.camel-base-engine > - 3.7.0 | MDC logging is enabled on CamelContext: camel-1 > 2021-01-22T06:07:28,968 | INFO | Blueprint Event Dispatcher: 1 | > AbstractCamelContext | 65 - org.apache.camel.camel-base-engine > - 3.7.0 | StreamCaching is not in use. If using streams then it's > recommended to enable stream caching. See more details at > http://camel.apache.org/stream-caching.html > 2021-01-22T06:07:28,998 | INFO | Blueprint Event Dispatcher: 1 | > InternalRouteStartupManager | 65 - org.apache.camel.camel-base-engine > - 3.7.0 | Route: test started and consuming from: timer://fire > 2021-01-22T06:07:29,003 | INFO | Blueprint Event Dispatcher: 1 | > AbstractCamelContext | 65 - org.apache.camel.camel-base-engine > - 3.7.0 | Total 1 routes, of which 1 are started > 2021-01-22T06:07:29,004 | INFO | Blueprint Event Dispatcher: 1 | > AbstractCamelContext | 65 - org.apache.camel.camel-base-engine > - 3.7.0 | Apache Camel 3.7.0 (camel-1) started in 112ms > 2021-01-22T06:07:30,017 | INFO | Camel (camel-1) thread #1 - timer://fire > | test | 63 - org.apache.camel.camel-api - > 3.7.0 | Exchange[ExchangePattern: InOnly, BodyType: String, Body: Hello > World] > > So, all good. > > Can you confirm that if you use this on your machine it doesn’t work ? > > I’m looking for a Windows VM to test. > > Regards > JB > > Le 21 janv. 2021 à 10:31, michael e a écrit : > > Hello JB, > > Any news or fix ? > > Thanks regards, > Michael. > > -- > *De :* Jean-Baptiste Onofre > *Envoyé :* jeudi 14 janvier 2021 10:16 > *À :* user > *Objet :* Re: Configuring MDC logging karaf 4 camel 3.7.0 > > Oh my bad, I completely forget the Windows test ;) > > I will do it just after AMQ release. For the tracking I will create a Jira. > > I’m very sorry. > > Regards > JB > > Le 14 janv. 2021 à 10:03, michael e a écrit : > > Hi JB, > > Any news about this ? > > Regards, > Michael. > > -- > > *De :* Jean-Baptis
Re: Configuring MDC logging karaf 4 camel 3.7.0
Hi Michael, I’ve resumed my test about Camel MDC. So, I created a simple route like this: http://www.osgi.org/xmlns/blueprint/v1.0.0;> http://camel.apache.org/schema/blueprint; useMDCLogging="true"> Hello World Then, in etc/org.ops4j.pax.logging.cfg, I added: log4j2.rootLogger.appenderRef.Sift.ref = Routing … log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = ${karaf.log}/camel-context-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB You can see the fileName containing camel.contextId. In data/log, I can see the log file created for my Camel Context: camel-context-camel-1.log containing: 2021-01-22T06:07:28,801 | INFO | Blueprint Event Dispatcher: 1 | JmxManagementStrategy| 88 - org.apache.camel.camel-management - 3.7.0 | JMX is enabled 2021-01-22T06:07:28,890 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - 3.7.0 | Apache Camel 3.7.0 (camel-1) is starting 2021-01-22T06:07:28,892 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - 3.7.0 | MDC logging is enabled on CamelContext: camel-1 2021-01-22T06:07:28,968 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - 3.7.0 | StreamCaching is not in use. If using streams then it's recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html 2021-01-22T06:07:28,998 | INFO | Blueprint Event Dispatcher: 1 | InternalRouteStartupManager | 65 - org.apache.camel.camel-base-engine - 3.7.0 | Route: test started and consuming from: timer://fire 2021-01-22T06:07:29,003 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - 3.7.0 | Total 1 routes, of which 1 are started 2021-01-22T06:07:29,004 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 65 - org.apache.camel.camel-base-engine - 3.7.0 | Apache Camel 3.7.0 (camel-1) started in 112ms 2021-01-22T06:07:30,017 | INFO | Camel (camel-1) thread #1 - timer://fire | test | 63 - org.apache.camel.camel-api - 3.7.0 | Exchange[ExchangePattern: InOnly, BodyType: String, Body: Hello World] So, all good. Can you confirm that if you use this on your machine it doesn’t work ? I’m looking for a Windows VM to test. Regards JB > Le 21 janv. 2021 à 10:31, michael e a écrit : > > Hello JB, > > Any news or fix ? > > Thanks regards, > Michael. > > De : Jean-Baptiste Onofre > Envoyé : jeudi 14 janvier 2021 10:16 > À : user > Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 > > Oh my bad, I completely forget the Windows test ;) > > I will do it just after AMQ release. For the tracking I will create a Jira. > > I’m very sorry. > > Regards > JB > >> Le 14 janv. 2021 à 10:03, michael e > <mailto:michaelel...@outlook.fr>> a écrit : >> >> Hi JB, >> >> Any news about this ? >> >> Regards, >> Michael. >> >> >> De : Jean-Baptiste Onofre mailto:j...@nanthrax.net>> >> Envoyé : mercredi 6 janvier 2021 17:21 >> À : user@karaf.apache.org <mailto:user@karaf.apache.org> >> mailto:user@karaf.apache.org>> >> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >> >> Hi Michael, >> >> Happy new year too ! >> >> I forgot during end of year vacation. I’m busy with ActiveMQ release >> preparation now, but I will switch back to test on Windows tomorrow. >> >> Regards >> JB >> >>> Le 6 janv. 2021 à 17:07, michael e >> <mailto:michaelel...@outlook.fr>> a écrit : >>> >>> Hello JB, >>> >>> Happy new year, any
RE: Configuring MDC logging karaf 4 camel 3.7.0
Hello JB, Any news or fix ? Thanks regards, Michael. De : Jean-Baptiste Onofre Envoyé : jeudi 14 janvier 2021 10:16 À : user Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Oh my bad, I completely forget the Windows test ;) I will do it just after AMQ release. For the tracking I will create a Jira. I’m very sorry. Regards JB Le 14 janv. 2021 à 10:03, michael e mailto:michaelel...@outlook.fr>> a écrit : Hi JB, Any news about this ? Regards, Michael. De : Jean-Baptiste Onofre mailto:j...@nanthrax.net>> Envoyé : mercredi 6 janvier 2021 17:21 À : user@karaf.apache.org<mailto:user@karaf.apache.org> mailto:user@karaf.apache.org>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi Michael, Happy new year too ! I forgot during end of year vacation. I’m busy with ActiveMQ release preparation now, but I will switch back to test on Windows tomorrow. Regards JB Le 6 janv. 2021 à 17:07, michael e mailto:michaelel...@outlook.fr>> a écrit : Hello JB, Happy new year, any news about this ? Thanks, Michael. De : JB Onofré mailto:j...@nanthrax.net>> Envoyé : jeudi 24 décembre 2020 17:00 À : user@karaf.apache.org<mailto:user@karaf.apache.org> mailto:user@karaf.apache.org>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 I would consider as a big if I have the error on Windows. I’m suspecting an issue on Windows only (I hate this os ;) ). Let me setup a vm (just need time). Regard JB Le 24 déc. 2020 à 16:36, michael e mailto:michaelel...@outlook.fr>> a écrit : Ok thanks so is a bug ? Or i just have to change something ? (This is the provided configuration i didn't change anythin expect fileName pattern) Regards, Michael. De : JB Onofré mailto:j...@nanthrax.net>> Envoyé : jeudi 24 décembre 2020 16:23 À : user@karaf.apache.org<mailto:user@karaf.apache.org> mailto:user@karaf.apache.org>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Understood. I don’t have any error. The error you have seems related to the rolling file configuration. Regards JB Le 24 déc. 2020 à 15:16, michael e mailto:michaelel...@outlook.fr>> a écrit : Ok thanks 'All log files are created and populated' for me also just then in the karaf i see ERROR logs Thanks, Regards, Michael. De : JB Onofré mailto:j...@nanthrax.net>> Envoyé : jeudi 24 décembre 2020 15:05 À : user@karaf.apache.org<mailto:user@karaf.apache.org> mailto:user@karaf.apache.org>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Yeah. I tried with the karaf camel examples. All log files are created and populated. I will bootstrap a Windows vm to test. Regards JB Le 24 déc. 2020 à 14:52, michael e mailto:michaelel...@outlook.fr>> a écrit : No it is a last fresh download version ok Karaf (4.3.0) did you try with camel MDC properties ? And no permission issues. Michael. De : JB Onofré mailto:j...@nanthrax.net>> Envoyé : jeudi 24 décembre 2020 14:42 À : user@karaf.apache.org<mailto:user@karaf.apache.org> mailto:user@karaf.apache.org>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 By the way, you don’t have any permission issue ? Le 24 déc. 2020 à 14:42, JB Onofré mailto:j...@nanthrax.net>> a écrit : Do you use karaf vanilla or a custom distribution ? I confirm that it works fine for me on Karaf vanilla (at least on Linux). Regards JB Le 24 déc. 2020 à 14:02, michael e mailto:michaelel...@outlook.fr>> a écrit : I also add the absolute path i also get exception my configuration: # Sift - MDC routing log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB Exception: org.ops4j.pax.logging.pax-logging-log4j2
Re: Configuring MDC logging karaf 4 camel 3.7.0
Oh my bad, I completely forget the Windows test ;) I will do it just after AMQ release. For the tracking I will create a Jira. I’m very sorry. Regards JB > Le 14 janv. 2021 à 10:03, michael e a écrit : > > Hi JB, > > Any news about this ? > > Regards, > Michael. > > De : Jean-Baptiste Onofre > Envoyé : mercredi 6 janvier 2021 17:21 > À : user@karaf.apache.org > Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 > > Hi Michael, > > Happy new year too ! > > I forgot during end of year vacation. I’m busy with ActiveMQ release > preparation now, but I will switch back to test on Windows tomorrow. > > Regards > JB > >> Le 6 janv. 2021 à 17:07, michael e > <mailto:michaelel...@outlook.fr>> a écrit : >> >> Hello JB, >> >> Happy new year, any news about this ? >> >> Thanks, >> Michael. >> >> >> De : JB Onofré mailto:j...@nanthrax.net>> >> Envoyé : jeudi 24 décembre 2020 17:00 >> À : user@karaf.apache.org <mailto:user@karaf.apache.org> >> mailto:user@karaf.apache.org>> >> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >> >> I would consider as a big if I have the error on Windows. >> >> I’m suspecting an issue on Windows only (I hate this os ;) ). >> >> Let me setup a vm (just need time). >> >> Regard >> JB >> >>> Le 24 déc. 2020 à 16:36, michael e >> <mailto:michaelel...@outlook.fr>> a écrit : >>> >>> >>> Ok thanks so is a bug ? Or i just have to change something ? (This is the >>> provided configuration i didn't change anythin expect fileName pattern) >>> >>> Regards, >>> Michael. >>> >>> >>> De : JB Onofré mailto:j...@nanthrax.net>> >>> Envoyé : jeudi 24 décembre 2020 16:23 >>> À : user@karaf.apache.org <mailto:user@karaf.apache.org> >>> mailto:user@karaf.apache.org>> >>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >>> >>> Understood. I don’t have any error. The error you have seems related to the >>> rolling file configuration. >>> >>> Regards >>> JB >>> >>>> Le 24 déc. 2020 à 15:16, michael e >>> <mailto:michaelel...@outlook.fr>> a écrit : >>>> >>>> >>>> Ok thanks 'All log files are created and populated' for me also just then >>>> in the karaf i see ERROR logs >>>> >>>> Thanks, >>>> Regards, >>>> Michael. >>>> >>>> >>>> De : JB Onofré mailto:j...@nanthrax.net>> >>>> Envoyé : jeudi 24 décembre 2020 15:05 >>>> À : user@karaf.apache.org <mailto:user@karaf.apache.org> >>>> mailto:user@karaf.apache.org>> >>>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >>>> >>>> Yeah. I tried with the karaf camel examples. All log files are created and >>>> populated. >>>> >>>> I will bootstrap a Windows vm to test. >>>> >>>> Regards >>>> JB >>>> >>>>> Le 24 déc. 2020 à 14:52, michael e >>>> <mailto:michaelel...@outlook.fr>> a écrit : >>>>> >>>>> >>>>> No it is a last fresh download version ok Karaf (4.3.0) did you try with >>>>> camel MDC properties ? And no permission issues. >>>>> >>>>> Michael. >>>>> >>>>> >>>>> De : JB Onofré mailto:j...@nanthrax.net>> >>>>> Envoyé : jeudi 24 décembre 2020 14:42 >>>>> À : user@karaf.apache.org <mailto:user@karaf.apache.org> >>>>> mailto:user@karaf.apache.org>> >>>>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >>>>> >>>>> By the way, you don’t have any permission issue ? >>>>> >>>>>> Le 24 déc. 2020 à 14:42, JB Onofré >>>>> <mailto:j...@nanthrax.net>> a écrit : >>>>>> >>>>>> >>>>>> Do you use karaf vanilla or a custom distribution ? >>>>>> >>>>>> I confirm that it works fine for me on Karaf vanilla (at least on >>>>>> Linux). >>>>>> >>>>>> Regards >>>>>> JB >>>>>> >>>>>>> Le 24 déc. 2020 à 14:02, michael e >>>>
RE: Configuring MDC logging karaf 4 camel 3.7.0
Hi JB, Any news about this ? Regards, Michael. De : Jean-Baptiste Onofre Envoyé : mercredi 6 janvier 2021 17:21 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi Michael, Happy new year too ! I forgot during end of year vacation. I’m busy with ActiveMQ release preparation now, but I will switch back to test on Windows tomorrow. Regards JB Le 6 janv. 2021 à 17:07, michael e mailto:michaelel...@outlook.fr>> a écrit : Hello JB, Happy new year, any news about this ? Thanks, Michael. De : JB Onofré mailto:j...@nanthrax.net>> Envoyé : jeudi 24 décembre 2020 17:00 À : user@karaf.apache.org<mailto:user@karaf.apache.org> mailto:user@karaf.apache.org>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 I would consider as a big if I have the error on Windows. I’m suspecting an issue on Windows only (I hate this os ;) ). Let me setup a vm (just need time). Regard JB Le 24 déc. 2020 à 16:36, michael e mailto:michaelel...@outlook.fr>> a écrit : Ok thanks so is a bug ? Or i just have to change something ? (This is the provided configuration i didn't change anythin expect fileName pattern) Regards, Michael. De : JB Onofré mailto:j...@nanthrax.net>> Envoyé : jeudi 24 décembre 2020 16:23 À : user@karaf.apache.org<mailto:user@karaf.apache.org> mailto:user@karaf.apache.org>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Understood. I don’t have any error. The error you have seems related to the rolling file configuration. Regards JB Le 24 déc. 2020 à 15:16, michael e mailto:michaelel...@outlook.fr>> a écrit : Ok thanks 'All log files are created and populated' for me also just then in the karaf i see ERROR logs Thanks, Regards, Michael. De : JB Onofré mailto:j...@nanthrax.net>> Envoyé : jeudi 24 décembre 2020 15:05 À : user@karaf.apache.org<mailto:user@karaf.apache.org> mailto:user@karaf.apache.org>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Yeah. I tried with the karaf camel examples. All log files are created and populated. I will bootstrap a Windows vm to test. Regards JB Le 24 déc. 2020 à 14:52, michael e mailto:michaelel...@outlook.fr>> a écrit : No it is a last fresh download version ok Karaf (4.3.0) did you try with camel MDC properties ? And no permission issues. Michael. De : JB Onofré mailto:j...@nanthrax.net>> Envoyé : jeudi 24 décembre 2020 14:42 À : user@karaf.apache.org<mailto:user@karaf.apache.org> mailto:user@karaf.apache.org>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 By the way, you don’t have any permission issue ? Le 24 déc. 2020 à 14:42, JB Onofré mailto:j...@nanthrax.net>> a écrit : Do you use karaf vanilla or a custom distribution ? I confirm that it works fine for me on Karaf vanilla (at least on Linux). Regards JB Le 24 déc. 2020 à 14:02, michael e mailto:michaelel...@outlook.fr>> a écrit : I also add the absolute path i also get exception my configuration: # Sift - MDC routing log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB Exception: org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@7ab1ab29] unabl
Re: Configuring MDC logging karaf 4 camel 3.7.0
Hi Michael, Happy new year too ! I forgot during end of year vacation. I’m busy with ActiveMQ release preparation now, but I will switch back to test on Windows tomorrow. Regards JB > Le 6 janv. 2021 à 17:07, michael e a écrit : > > Hello JB, > > Happy new year, any news about this ? > > Thanks, > Michael. > > De : JB Onofré > Envoyé : jeudi 24 décembre 2020 17:00 > À : user@karaf.apache.org > Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 > > I would consider as a big if I have the error on Windows. > > I’m suspecting an issue on Windows only (I hate this os ;) ). > > Let me setup a vm (just need time). > > Regard > JB > >> Le 24 déc. 2020 à 16:36, michael e a écrit : >> >> >> Ok thanks so is a bug ? Or i just have to change something ? (This is the >> provided configuration i didn't change anythin expect fileName pattern) >> >> Regards, >> Michael. >> >> De : JB Onofré >> Envoyé : jeudi 24 décembre 2020 16:23 >> À : user@karaf.apache.org >> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >> >> Understood. I don’t have any error. The error you have seems related to the >> rolling file configuration. >> >> Regards >> JB >> >>> Le 24 déc. 2020 à 15:16, michael e a écrit : >>> >>> >>> Ok thanks 'All log files are created and populated' for me also just then >>> in the karaf i see ERROR logs >>> >>> Thanks, >>> Regards, >>> Michael. >>> >>> De : JB Onofré >>> Envoyé : jeudi 24 décembre 2020 15:05 >>> À : user@karaf.apache.org >>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >>> >>> Yeah. I tried with the karaf camel examples. All log files are created and >>> populated. >>> >>> I will bootstrap a Windows vm to test. >>> >>> Regards >>> JB >>> >>>> Le 24 déc. 2020 à 14:52, michael e a écrit : >>>> >>>> >>>> No it is a last fresh download version ok Karaf (4.3.0) did you try with >>>> camel MDC properties ? And no permission issues. >>>> >>>> Michael. >>>> >>>> De : JB Onofré >>>> Envoyé : jeudi 24 décembre 2020 14:42 >>>> À : user@karaf.apache.org >>>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >>>> >>>> By the way, you don’t have any permission issue ? >>>> >>>>> Le 24 déc. 2020 à 14:42, JB Onofré a écrit : >>>>> >>>>> >>>>> Do you use karaf vanilla or a custom distribution ? >>>>> >>>>> I confirm that it works fine for me on Karaf vanilla (at least on Linux). >>>>> >>>>> Regards >>>>> JB >>>>> >>>>>> Le 24 déc. 2020 à 14:02, michael e a écrit : >>>>>> >>>>>> >>>>>> I also add the absolute path i also get exception >>>>>> >>>>>> my configuration: >>>>>> >>>>>> # Sift - MDC routing >>>>>> log4j2.appender.routing.type = Routing >>>>>> log4j2.appender.routing.name = Routing >>>>>> log4j2.appender.routing.routes.type = Routes >>>>>> log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} >>>>>> log4j2.appender.routing.routes.bundle.type = Route >>>>>> log4j2.appender.routing.routes.bundle.appender.type = >>>>>> RollingRandomAccessFile >>>>>> log4j2.appender.routing.routes.bundle.appender.name = >>>>>> Bundle-\$\\\{ctx:bundle.name\} >>>>>> log4j2.appender.routing.routes.bundle.appender.fileName = >>>>>> D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log >>>>>> log4j2.appender.routing.routes.bundle.appender.filePattern = >>>>>> ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i >>>>>> log4j2.appender.routing.routes.bundle.appender.append = true >>>>>> log4j2.appender.routing.routes.bundle.appender.layout.type = >>>>>> PatternLayout >>>>>> log4j2.appender.routing.routes.bundle.appender.layout.pattern = >>>>>> ${log4j2.pattern} >>>>>> log4j2.appender.routing.routes.bundle.appender.policies.type = Policies
RE: Configuring MDC logging karaf 4 camel 3.7.0
Hello JB, Happy new year, any news about this ? Thanks, Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 17:00 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 I would consider as a big if I have the error on Windows. I’m suspecting an issue on Windows only (I hate this os ;) ). Let me setup a vm (just need time). Regard JB Le 24 déc. 2020 à 16:36, michael e a écrit : Ok thanks so is a bug ? Or i just have to change something ? (This is the provided configuration i didn't change anythin expect fileName pattern) Regards, Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 16:23 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Understood. I don’t have any error. The error you have seems related to the rolling file configuration. Regards JB Le 24 déc. 2020 à 15:16, michael e a écrit : Ok thanks 'All log files are created and populated' for me also just then in the karaf i see ERROR logs Thanks, Regards, Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 15:05 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Yeah. I tried with the karaf camel examples. All log files are created and populated. I will bootstrap a Windows vm to test. Regards JB Le 24 déc. 2020 à 14:52, michael e a écrit : No it is a last fresh download version ok Karaf (4.3.0) did you try with camel MDC properties ? And no permission issues. Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 14:42 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 By the way, you don’t have any permission issue ? Le 24 déc. 2020 à 14:42, JB Onofré a écrit : Do you use karaf vanilla or a custom distribution ? I confirm that it works fine for me on Karaf vanilla (at least on Linux). Regards JB Le 24 déc. 2020 à 14:02, michael e a écrit : I also add the absolute path i also get exception my configuration: # Sift - MDC routing log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB Exception: org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@7ab1ab29] unable to create manager for [D:/karaf/apache-karaf-4.3.0/data/log/bundle-${ctx:camel.contextId}.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@3219c6e6] org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create Appender of type RollingRandomAccessFile Regards, Michael. De : Jean-Baptiste Onofre Envoyé : jeudi 24 décembre 2020 07:13 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi, I just tested the configuration I provided in etc/org.ops4j.pax.logging.cfg. Here’s my config (in etc/org.ops4j.pax.logging.cfg): First, I’ve enabled sift appender: log4j2.rootLogger.appenderRef.Sift.ref = Routing Then, I added the appender: log4j2
RE: Configuring MDC logging karaf 4 camel 3.7.0
If you want you can use my computer to avoid building windows vm Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 17:00 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 I would consider as a big if I have the error on Windows. I’m suspecting an issue on Windows only (I hate this os ;) ). Let me setup a vm (just need time). Regard JB Le 24 déc. 2020 à 16:36, michael e a écrit : Ok thanks so is a bug ? Or i just have to change something ? (This is the provided configuration i didn't change anythin expect fileName pattern) Regards, Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 16:23 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Understood. I don’t have any error. The error you have seems related to the rolling file configuration. Regards JB Le 24 déc. 2020 à 15:16, michael e a écrit : Ok thanks 'All log files are created and populated' for me also just then in the karaf i see ERROR logs Thanks, Regards, Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 15:05 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Yeah. I tried with the karaf camel examples. All log files are created and populated. I will bootstrap a Windows vm to test. Regards JB Le 24 déc. 2020 à 14:52, michael e a écrit : No it is a last fresh download version ok Karaf (4.3.0) did you try with camel MDC properties ? And no permission issues. Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 14:42 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 By the way, you don’t have any permission issue ? Le 24 déc. 2020 à 14:42, JB Onofré a écrit : Do you use karaf vanilla or a custom distribution ? I confirm that it works fine for me on Karaf vanilla (at least on Linux). Regards JB Le 24 déc. 2020 à 14:02, michael e a écrit : I also add the absolute path i also get exception my configuration: # Sift - MDC routing log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB Exception: org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@7ab1ab29] unable to create manager for [D:/karaf/apache-karaf-4.3.0/data/log/bundle-${ctx:camel.contextId}.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@3219c6e6] org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create Appender of type RollingRandomAccessFile Regards, Michael. De : Jean-Baptiste Onofre Envoyé : jeudi 24 décembre 2020 07:13 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi, I just tested the configuration I provided in etc/org.ops4j.pax.logging.cfg. Here’s my config (in etc/org.ops4j.pax.logging.cfg): First, I’ve enabled sift appender: log4j2.rootLogger.appenderRef.Sift.ref = Routing Then, I added the appender: log4j2
Re: Configuring MDC logging karaf 4 camel 3.7.0
I would consider as a big if I have the error on Windows. I’m suspecting an issue on Windows only (I hate this os ;) ). Let me setup a vm (just need time). Regard JB > Le 24 déc. 2020 à 16:36, michael e a écrit : > > > Ok thanks so is a bug ? Or i just have to change something ? (This is the > provided configuration i didn't change anythin expect fileName pattern) > > Regards, > Michael. > > De : JB Onofré > Envoyé : jeudi 24 décembre 2020 16:23 > À : user@karaf.apache.org > Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 > > Understood. I don’t have any error. The error you have seems related to the > rolling file configuration. > > Regards > JB > >>> Le 24 déc. 2020 à 15:16, michael e a écrit : >>> >> >> Ok thanks 'All log files are created and populated' for me also just then >> in the karaf i see ERROR logs >> >> Thanks, >> Regards, >> Michael. >> >> De : JB Onofré >> Envoyé : jeudi 24 décembre 2020 15:05 >> À : user@karaf.apache.org >> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >> >> Yeah. I tried with the karaf camel examples. All log files are created and >> populated. >> >> I will bootstrap a Windows vm to test. >> >> Regards >> JB >> >>> Le 24 déc. 2020 à 14:52, michael e a écrit : >>> >>> >>> No it is a last fresh download version ok Karaf (4.3.0) did you try with >>> camel MDC properties ? And no permission issues. >>> >>> Michael. >>> >>> De : JB Onofré >>> Envoyé : jeudi 24 décembre 2020 14:42 >>> À : user@karaf.apache.org >>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >>> >>> By the way, you don’t have any permission issue ? >>> >>>> Le 24 déc. 2020 à 14:42, JB Onofré a écrit : >>>> >>>> >>>> Do you use karaf vanilla or a custom distribution ? >>>> >>>> I confirm that it works fine for me on Karaf vanilla (at least on Linux). >>>> >>>> Regards >>>> JB >>>> >>>>> Le 24 déc. 2020 à 14:02, michael e a écrit : >>>>> >>>>> >>>>> I also add the absolute path i also get exception >>>>> >>>>> my configuration: >>>>> >>>>> # Sift - MDC routing >>>>> log4j2.appender.routing.type = Routing >>>>> log4j2.appender.routing.name = Routing >>>>> log4j2.appender.routing.routes.type = Routes >>>>> log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} >>>>> log4j2.appender.routing.routes.bundle.type = Route >>>>> log4j2.appender.routing.routes.bundle.appender.type = >>>>> RollingRandomAccessFile >>>>> log4j2.appender.routing.routes.bundle.appender.name = >>>>> Bundle-\$\\\{ctx:bundle.name\} >>>>> log4j2.appender.routing.routes.bundle.appender.fileName = >>>>> D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log >>>>> log4j2.appender.routing.routes.bundle.appender.filePattern = >>>>> ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i >>>>> log4j2.appender.routing.routes.bundle.appender.append = true >>>>> log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout >>>>> log4j2.appender.routing.routes.bundle.appender.layout.pattern = >>>>> ${log4j2.pattern} >>>>> log4j2.appender.routing.routes.bundle.appender.policies.type = Policies >>>>> log4j2.appender.routing.routes.bundle.appender.policies.size.type = >>>>> SizeBasedTriggeringPolicy >>>>> log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB >>>>> >>>>> Exception: >>>>> >>>>> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access >>>>> RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de >>>>> répertoire ou de volume est incorrecte >>>>> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not >>>>> create plugin of type class >>>>> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender >>>>> for element RollingRandomAccessFile: java.lang.IllegalStateException: >>>>> ManagerFactory >>>>> [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFi
RE: Configuring MDC logging karaf 4 camel 3.7.0
Ok thanks so is a bug ? Or i just have to change something ? (This is the provided configuration i didn't change anythin expect fileName pattern) Regards, Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 16:23 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Understood. I don’t have any error. The error you have seems related to the rolling file configuration. Regards JB Le 24 déc. 2020 à 15:16, michael e a écrit : Ok thanks 'All log files are created and populated' for me also just then in the karaf i see ERROR logs Thanks, Regards, Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 15:05 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Yeah. I tried with the karaf camel examples. All log files are created and populated. I will bootstrap a Windows vm to test. Regards JB Le 24 déc. 2020 à 14:52, michael e a écrit : No it is a last fresh download version ok Karaf (4.3.0) did you try with camel MDC properties ? And no permission issues. Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 14:42 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 By the way, you don’t have any permission issue ? Le 24 déc. 2020 à 14:42, JB Onofré a écrit : Do you use karaf vanilla or a custom distribution ? I confirm that it works fine for me on Karaf vanilla (at least on Linux). Regards JB Le 24 déc. 2020 à 14:02, michael e a écrit : I also add the absolute path i also get exception my configuration: # Sift - MDC routing log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB Exception: org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@7ab1ab29] unable to create manager for [D:/karaf/apache-karaf-4.3.0/data/log/bundle-${ctx:camel.contextId}.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@3219c6e6] org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create Appender of type RollingRandomAccessFile Regards, Michael. De : Jean-Baptiste Onofre Envoyé : jeudi 24 décembre 2020 07:13 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi, I just tested the configuration I provided in etc/org.ops4j.pax.logging.cfg. Here’s my config (in etc/org.ops4j.pax.logging.cfg): First, I’ve enabled sift appender: log4j2.rootLogger.appenderRef.Sift.ref = Routing Then, I added the appender: log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = ${karaf.log}/bundle
Re: Configuring MDC logging karaf 4 camel 3.7.0
Understood. I don’t have any error. The error you have seems related to the rolling file configuration. Regards JB > Le 24 déc. 2020 à 15:16, michael e a écrit : > > > Ok thanks 'All log files are created and populated' for me also just then in > the karaf i see ERROR logs > > Thanks, > Regards, > Michael. > > De : JB Onofré > Envoyé : jeudi 24 décembre 2020 15:05 > À : user@karaf.apache.org > Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 > > Yeah. I tried with the karaf camel examples. All log files are created and > populated. > > I will bootstrap a Windows vm to test. > > Regards > JB > >>> Le 24 déc. 2020 à 14:52, michael e a écrit : >>> >> >> No it is a last fresh download version ok Karaf (4.3.0) did you try with >> camel MDC properties ? And no permission issues. >> >> Michael. >> >> De : JB Onofré >> Envoyé : jeudi 24 décembre 2020 14:42 >> À : user@karaf.apache.org >> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >> >> By the way, you don’t have any permission issue ? >> >>> Le 24 déc. 2020 à 14:42, JB Onofré a écrit : >>> >>> >>> Do you use karaf vanilla or a custom distribution ? >>> >>> I confirm that it works fine for me on Karaf vanilla (at least on Linux). >>> >>> Regards >>> JB >>> >>>> Le 24 déc. 2020 à 14:02, michael e a écrit : >>>> >>>> >>>> I also add the absolute path i also get exception >>>> >>>> my configuration: >>>> >>>> # Sift - MDC routing >>>> log4j2.appender.routing.type = Routing >>>> log4j2.appender.routing.name = Routing >>>> log4j2.appender.routing.routes.type = Routes >>>> log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} >>>> log4j2.appender.routing.routes.bundle.type = Route >>>> log4j2.appender.routing.routes.bundle.appender.type = >>>> RollingRandomAccessFile >>>> log4j2.appender.routing.routes.bundle.appender.name = >>>> Bundle-\$\\\{ctx:bundle.name\} >>>> log4j2.appender.routing.routes.bundle.appender.fileName = >>>> D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log >>>> log4j2.appender.routing.routes.bundle.appender.filePattern = >>>> ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i >>>> log4j2.appender.routing.routes.bundle.appender.append = true >>>> log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout >>>> log4j2.appender.routing.routes.bundle.appender.layout.pattern = >>>> ${log4j2.pattern} >>>> log4j2.appender.routing.routes.bundle.appender.policies.type = Policies >>>> log4j2.appender.routing.routes.bundle.appender.policies.size.type = >>>> SizeBasedTriggeringPolicy >>>> log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB >>>> >>>> Exception: >>>> >>>> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access >>>> RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de >>>> répertoire ou de volume est incorrecte >>>> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create >>>> plugin of type class >>>> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for >>>> element RollingRandomAccessFile: java.lang.IllegalStateException: >>>> ManagerFactory >>>> [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@7ab1ab29] >>>> unable to create manager for >>>> [D:/karaf/apache-karaf-4.3.0/data/log/bundle-${ctx:camel.contextId}.log] >>>> with data >>>> [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@3219c6e6] >>>> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke >>>> factory method in class >>>> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for >>>> element RollingRandomAccessFile: java.lang.IllegalStateException: No >>>> factory method found for class >>>> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender >>>> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create >>>> Appender of type RollingRandomAccessFile >>
RE: Configuring MDC logging karaf 4 camel 3.7.0
Ok thanks 'All log files are created and populated' for me also just then in the karaf i see ERROR logs Thanks, Regards, Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 15:05 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Yeah. I tried with the karaf camel examples. All log files are created and populated. I will bootstrap a Windows vm to test. Regards JB Le 24 déc. 2020 à 14:52, michael e a écrit : No it is a last fresh download version ok Karaf (4.3.0) did you try with camel MDC properties ? And no permission issues. Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 14:42 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 By the way, you don’t have any permission issue ? Le 24 déc. 2020 à 14:42, JB Onofré a écrit : Do you use karaf vanilla or a custom distribution ? I confirm that it works fine for me on Karaf vanilla (at least on Linux). Regards JB Le 24 déc. 2020 à 14:02, michael e a écrit : I also add the absolute path i also get exception my configuration: # Sift - MDC routing log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB Exception: org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@7ab1ab29] unable to create manager for [D:/karaf/apache-karaf-4.3.0/data/log/bundle-${ctx:camel.contextId}.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@3219c6e6] org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create Appender of type RollingRandomAccessFile Regards, Michael. De : Jean-Baptiste Onofre Envoyé : jeudi 24 décembre 2020 07:13 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi, I just tested the configuration I provided in etc/org.ops4j.pax.logging.cfg. Here’s my config (in etc/org.ops4j.pax.logging.cfg): First, I’ve enabled sift appender: log4j2.rootLogger.appenderRef.Sift.ref = Routing Then, I added the appender: log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type
Re: Configuring MDC logging karaf 4 camel 3.7.0
Yeah. I tried with the karaf camel examples. All log files are created and populated. I will bootstrap a Windows vm to test. Regards JB > Le 24 déc. 2020 à 14:52, michael e a écrit : > > > No it is a last fresh download version ok Karaf (4.3.0) did you try with > camel MDC properties ? And no permission issues. > > Michael. > > De : JB Onofré > Envoyé : jeudi 24 décembre 2020 14:42 > À : user@karaf.apache.org > Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 > > By the way, you don’t have any permission issue ? > >>> Le 24 déc. 2020 à 14:42, JB Onofré a écrit : >>> >> >> Do you use karaf vanilla or a custom distribution ? >> >> I confirm that it works fine for me on Karaf vanilla (at least on Linux). >> >> Regards >> JB >> >>> Le 24 déc. 2020 à 14:02, michael e a écrit : >>> >>> >>> I also add the absolute path i also get exception >>> >>> my configuration: >>> >>> # Sift - MDC routing >>> log4j2.appender.routing.type = Routing >>> log4j2.appender.routing.name = Routing >>> log4j2.appender.routing.routes.type = Routes >>> log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} >>> log4j2.appender.routing.routes.bundle.type = Route >>> log4j2.appender.routing.routes.bundle.appender.type = >>> RollingRandomAccessFile >>> log4j2.appender.routing.routes.bundle.appender.name = >>> Bundle-\$\\\{ctx:bundle.name\} >>> log4j2.appender.routing.routes.bundle.appender.fileName = >>> D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log >>> log4j2.appender.routing.routes.bundle.appender.filePattern = >>> ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i >>> log4j2.appender.routing.routes.bundle.appender.append = true >>> log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout >>> log4j2.appender.routing.routes.bundle.appender.layout.pattern = >>> ${log4j2.pattern} >>> log4j2.appender.routing.routes.bundle.appender.policies.type = Policies >>> log4j2.appender.routing.routes.bundle.appender.policies.size.type = >>> SizeBasedTriggeringPolicy >>> log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB >>> >>> Exception: >>> >>> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access >>> RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de >>> répertoire ou de volume est incorrecte >>> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create >>> plugin of type class >>> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for >>> element RollingRandomAccessFile: java.lang.IllegalStateException: >>> ManagerFactory >>> [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@7ab1ab29] >>> unable to create manager for >>> [D:/karaf/apache-karaf-4.3.0/data/log/bundle-${ctx:camel.contextId}.log] >>> with data >>> [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@3219c6e6] >>> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke >>> factory method in class >>> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for >>> element RollingRandomAccessFile: java.lang.IllegalStateException: No >>> factory method found for class >>> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender >>> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create >>> Appender of type RollingRandomAccessFile >>> >>> Regards, >>> Michael. >>> >>> De : Jean-Baptiste Onofre >>> Envoyé : jeudi 24 décembre 2020 07:13 >>> À : user@karaf.apache.org >>> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >>> >>> Hi, >>> >>> I just tested the configuration I provided in etc/org.ops4j.pax.logging.cfg. >>> >>> Here’s my config (in etc/org.ops4j.pax.logging.cfg): >>> >>> First, I’ve enabled sift appender: >>> >>> log4j2.rootLogger.appenderRef.Sift.ref = Routing >>> >>> Then, I added the appender: >>> >>> log4j2.appender.routing.type = Routing >>> log4j2.appender.routing.name = Routing >>> log4j2.appender.routing.routes.type = Routes >>> log4j2.appender.routing.routes.patte
RE: Configuring MDC logging karaf 4 camel 3.7.0
No it is a last fresh download version ok Karaf (4.3.0) did you try with camel MDC properties ? And no permission issues. Michael. De : JB Onofré Envoyé : jeudi 24 décembre 2020 14:42 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 By the way, you don’t have any permission issue ? Le 24 déc. 2020 à 14:42, JB Onofré a écrit : Do you use karaf vanilla or a custom distribution ? I confirm that it works fine for me on Karaf vanilla (at least on Linux). Regards JB Le 24 déc. 2020 à 14:02, michael e a écrit : I also add the absolute path i also get exception my configuration: # Sift - MDC routing log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB Exception: org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@7ab1ab29] unable to create manager for [D:/karaf/apache-karaf-4.3.0/data/log/bundle-${ctx:camel.contextId}.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@3219c6e6] org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create Appender of type RollingRandomAccessFile Regards, Michael. De : Jean-Baptiste Onofre Envoyé : jeudi 24 décembre 2020 07:13 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi, I just tested the configuration I provided in etc/org.ops4j.pax.logging.cfg. Here’s my config (in etc/org.ops4j.pax.logging.cfg): First, I’ve enabled sift appender: log4j2.rootLogger.appenderRef.Sift.ref = Routing Then, I added the appender: log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB And it works fine. It seems that your problem is about Windows. You are mixing windows style path with Unix style. For fileName and filePattern, can you please use absolution path. Something like: log4j2.appender.routing.routes.bundle.appender.fileName = D:\karaf\apache-karaf-4.3.0\bundle-\$\\\{ctx:bundle.name\}.log It should work. Regards JB Le 23 déc. 2020 à 10:58, michael e
Re: Configuring MDC logging karaf 4 camel 3.7.0
By the way, you don’t have any permission issue ? > Le 24 déc. 2020 à 14:42, JB Onofré a écrit : > > > Do you use karaf vanilla or a custom distribution ? > > I confirm that it works fine for me on Karaf vanilla (at least on Linux). > > Regards > JB > >>> Le 24 déc. 2020 à 14:02, michael e a écrit : >>> >> >> I also add the absolute path i also get exception >> >> my configuration: >> >> # Sift - MDC routing >> log4j2.appender.routing.type = Routing >> log4j2.appender.routing.name = Routing >> log4j2.appender.routing.routes.type = Routes >> log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} >> log4j2.appender.routing.routes.bundle.type = Route >> log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile >> log4j2.appender.routing.routes.bundle.appender.name = >> Bundle-\$\\\{ctx:bundle.name\} >> log4j2.appender.routing.routes.bundle.appender.fileName = >> D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log >> log4j2.appender.routing.routes.bundle.appender.filePattern = >> ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i >> log4j2.appender.routing.routes.bundle.appender.append = true >> log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout >> log4j2.appender.routing.routes.bundle.appender.layout.pattern = >> ${log4j2.pattern} >> log4j2.appender.routing.routes.bundle.appender.policies.type = Policies >> log4j2.appender.routing.routes.bundle.appender.policies.size.type = >> SizeBasedTriggeringPolicy >> log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB >> >> Exception: >> >> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access >> RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de >> répertoire ou de volume est incorrecte >> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create >> plugin of type class >> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for >> element RollingRandomAccessFile: java.lang.IllegalStateException: >> ManagerFactory >> [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@7ab1ab29] >> unable to create manager for >> [D:/karaf/apache-karaf-4.3.0/data/log/bundle-${ctx:camel.contextId}.log] >> with data >> [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@3219c6e6] >> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke >> factory method in class >> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for >> element RollingRandomAccessFile: java.lang.IllegalStateException: No factory >> method found for class >> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender >> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create >> Appender of type RollingRandomAccessFile >> >> Regards, >> Michael. >> >> De : Jean-Baptiste Onofre >> Envoyé : jeudi 24 décembre 2020 07:13 >> À : user@karaf.apache.org >> Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 >> >> Hi, >> >> I just tested the configuration I provided in etc/org.ops4j.pax.logging.cfg. >> >> Here’s my config (in etc/org.ops4j.pax.logging.cfg): >> >> First, I’ve enabled sift appender: >> >> log4j2.rootLogger.appenderRef.Sift.ref = Routing >> >> Then, I added the appender: >> >> log4j2.appender.routing.type = Routing >> log4j2.appender.routing.name = Routing >> log4j2.appender.routing.routes.type = Routes >> log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} >> log4j2.appender.routing.routes.bundle.type = Route >> log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile >> log4j2.appender.routing.routes.bundle.appender.name = >> Bundle-\$\\\{ctx:bundle.name\} >> log4j2.appender.routing.routes.bundle.appender.fileName = >> ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log >> log4j2.appender.routing.routes.bundle.appender.filePattern = >> ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i >> log4j2.appender.routing.routes.bundle.appender.append = true >> log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout >> log4j2.appender.routing.routes.bundle.appender.layout.pattern = >> ${log4j2.pattern} >> log4j2.appender.routing.routes.bundle.appender.policies.type = Policies >> log4j2.appender.routing.
Re: Configuring MDC logging karaf 4 camel 3.7.0
Do you use karaf vanilla or a custom distribution ? I confirm that it works fine for me on Karaf vanilla (at least on Linux). Regards JB > Le 24 déc. 2020 à 14:02, michael e a écrit : > > > I also add the absolute path i also get exception > > my configuration: > > # Sift - MDC routing > log4j2.appender.routing.type = Routing > log4j2.appender.routing.name = Routing > log4j2.appender.routing.routes.type = Routes > log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} > log4j2.appender.routing.routes.bundle.type = Route > log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile > log4j2.appender.routing.routes.bundle.appender.name = > Bundle-\$\\\{ctx:bundle.name\} > log4j2.appender.routing.routes.bundle.appender.fileName = > D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log > log4j2.appender.routing.routes.bundle.appender.filePattern = > ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i > log4j2.appender.routing.routes.bundle.appender.append = true > log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout > log4j2.appender.routing.routes.bundle.appender.layout.pattern = > ${log4j2.pattern} > log4j2.appender.routing.routes.bundle.appender.policies.type = Policies > log4j2.appender.routing.routes.bundle.appender.policies.size.type = > SizeBasedTriggeringPolicy > log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB > > Exception: > > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access > RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de > répertoire ou de volume est incorrecte > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create > plugin of type class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for > element RollingRandomAccessFile: java.lang.IllegalStateException: > ManagerFactory > [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@7ab1ab29] > unable to create manager for > [D:/karaf/apache-karaf-4.3.0/data/log/bundle-${ctx:camel.contextId}.log] with > data > [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@3219c6e6] > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke > factory method in class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for > element RollingRandomAccessFile: java.lang.IllegalStateException: No factory > method found for class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create > Appender of type RollingRandomAccessFile > > Regards, > Michael. > > De : Jean-Baptiste Onofre > Envoyé : jeudi 24 décembre 2020 07:13 > À : user@karaf.apache.org > Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 > > Hi, > > I just tested the configuration I provided in etc/org.ops4j.pax.logging.cfg. > > Here’s my config (in etc/org.ops4j.pax.logging.cfg): > > First, I’ve enabled sift appender: > > log4j2.rootLogger.appenderRef.Sift.ref = Routing > > Then, I added the appender: > > log4j2.appender.routing.type = Routing > log4j2.appender.routing.name = Routing > log4j2.appender.routing.routes.type = Routes > log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} > log4j2.appender.routing.routes.bundle.type = Route > log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile > log4j2.appender.routing.routes.bundle.appender.name = > Bundle-\$\\\{ctx:bundle.name\} > log4j2.appender.routing.routes.bundle.appender.fileName = > ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log > log4j2.appender.routing.routes.bundle.appender.filePattern = > ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i > log4j2.appender.routing.routes.bundle.appender.append = true > log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout > log4j2.appender.routing.routes.bundle.appender.layout.pattern = > ${log4j2.pattern} > log4j2.appender.routing.routes.bundle.appender.policies.type = Policies > log4j2.appender.routing.routes.bundle.appender.policies.size.type = > SizeBasedTriggeringPolicy > log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB > > And it works fine. > > It seems that your problem is about Windows. > You are mixing windows style path with Unix style. > > For fileName and filePattern, can you please use absolution path. Something > like: > > log4j2.appender.routing.routes.bundle.appender.fileName = > D:\karaf\apache-karaf-4.3.0\bundle-\$\\\{ctx:bundl
RE: Configuring MDC logging karaf 4 camel 3.7.0
I also add the absolute path i also get exception my configuration: # Sift - MDC routing log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = D:/karaf/apache-karaf-4.3.0/data/log/bundle-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB Exception: org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@7ab1ab29] unable to create manager for [D:/karaf/apache-karaf-4.3.0/data/log/bundle-${ctx:camel.contextId}.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@3219c6e6] org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create Appender of type RollingRandomAccessFile Regards, Michael. De : Jean-Baptiste Onofre Envoyé : jeudi 24 décembre 2020 07:13 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi, I just tested the configuration I provided in etc/org.ops4j.pax.logging.cfg. Here’s my config (in etc/org.ops4j.pax.logging.cfg): First, I’ve enabled sift appender: log4j2.rootLogger.appenderRef.Sift.ref = Routing Then, I added the appender: log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB And it works fine. It seems that your problem is about Windows. You are mixing windows style path with Unix style. For fileName and filePattern, can you please use absolution path. Something like: log4j2.appender.routing.routes.bundle.appender.fileName = D:\karaf\apache-karaf-4.3.0\bundle-\$\\\{ctx:bundle.name\}.log It should work. Regards JB Le 23 déc. 2020 à 10:58, michael e mailto:michaelel...@outlook.fr>> a écrit : Hello, I'm getting in trouble trying to configure MDC logging with latest Karaf and Camel Version Here my logging configuration log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\}
RE: Configuring MDC logging karaf 4 camel 3.7.0
Hi JB, Thanks but it not the point as i explained in my first message it's happen only when i try to use camel MDC property by the way sift file is correctly created but i get in my console a lot of exceptions. My blueprint http://camel.apache.org/schema/blueprint; useMDCLogging="true" id="myContext"> Then in my logging conf: log4j2.appender.routing.routes.bundle.appender.fileName = ${karaf.data}/log/sift-\$\\\{ctx:camel.contextId\}.log Another two things: 1. The default file also work but is not what i'm interresting here 2. Why i need to add all this escape thing it was not the case before Regards, Michael. De : Jean-Baptiste Onofre Envoyé : jeudi 24 décembre 2020 07:13 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi, I just tested the configuration I provided in etc/org.ops4j.pax.logging.cfg. Here’s my config (in etc/org.ops4j.pax.logging.cfg): First, I’ve enabled sift appender: log4j2.rootLogger.appenderRef.Sift.ref = Routing Then, I added the appender: log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB And it works fine. It seems that your problem is about Windows. You are mixing windows style path with Unix style. For fileName and filePattern, can you please use absolution path. Something like: log4j2.appender.routing.routes.bundle.appender.fileName = D:\karaf\apache-karaf-4.3.0\bundle-\$\\\{ctx:bundle.name\}.log It should work. Regards JB Le 23 déc. 2020 à 10:58, michael e mailto:michaelel...@outlook.fr>> a écrit : Hello, I'm getting in trouble trying to configure MDC logging with latest Karaf and Camel Version Here my logging configuration log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = ${karaf.data}/log/sift-camel-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB Logging file is correctly created but i get exception in my Karaf karaf@root()> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@26d9daed] unable to create manager for [D:\karaf\apache-karaf-4.3.0\data/log/sift-camel-${ctx:camel.contextId}.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@34bd66be] org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No
Re: Configuring MDC logging karaf 4 camel 3.7.0
Hi, I just tested the configuration I provided in etc/org.ops4j.pax.logging.cfg. Here’s my config (in etc/org.ops4j.pax.logging.cfg): First, I’ve enabled sift appender: log4j2.rootLogger.appenderRef.Sift.ref = Routing Then, I added the appender: log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB And it works fine. It seems that your problem is about Windows. You are mixing windows style path with Unix style. For fileName and filePattern, can you please use absolution path. Something like: log4j2.appender.routing.routes.bundle.appender.fileName = D:\karaf\apache-karaf-4.3.0\bundle-\$\\\{ctx:bundle.name\}.log It should work. Regards JB > Le 23 déc. 2020 à 10:58, michael e a écrit : > > Hello, > > I'm getting in trouble trying to configure MDC logging with latest Karaf and > Camel Version > > Here my logging configuration > > log4j2.appender.routing.type = Routing > log4j2.appender.routing.name = Routing > log4j2.appender.routing.routes.type = Routes > log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} > log4j2.appender.routing.routes.bundle.type = Route > log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile > log4j2.appender.routing.routes.bundle.appender.name = > Bundle-\$\\\{ctx:bundle.name\} > log4j2.appender.routing.routes.bundle.appender.fileName = > ${karaf.data}/log/sift-camel-\$\\\{ctx:camel.contextId\}.log > log4j2.appender.routing.routes.bundle.appender.filePattern = > ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i > log4j2.appender.routing.routes.bundle.appender.append = true > log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout > log4j2.appender.routing.routes.bundle.appender.layout.pattern = > ${log4j2.pattern} > log4j2.appender.routing.routes.bundle.appender.policies.type = Policies > log4j2.appender.routing.routes.bundle.appender.policies.size.type = > SizeBasedTriggeringPolicy > log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB > > Logging file is correctly created but i get exception in my Karaf > > > karaf@root()> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : > Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de > fichier, de répertoire ou de volume est incorrecte > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create > plugin of type class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for > element RollingRandomAccessFile: java.lang.IllegalStateException: > ManagerFactory > [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@26d9daed] > unable to create manager for > [D:\karaf\apache-karaf-4.3.0\data/log/sift-camel-${ctx:camel.contextId}.log] > with data > [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@34bd66be] > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke > factory method in class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for > element RollingRandomAccessFile: java.lang.IllegalStateException: No factory > method found for class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create > Appender of type RollingRandomAccessFile > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access > RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de > répertoire ou de volume est incorrecte > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create > plugin of type class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for > element RollingRandomAccessFile: java.lang.IllegalStateException: > ManagerFactory > [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@26d9daed]
Re: Configuring MDC logging karaf 4 camel 3.7.0
Hey I will open the PR tonight or tomorrow morning. When done I will share with you. Regards JB > Le 23 déc. 2020 à 18:06, michael e a écrit : > > > Hi JB, > > Thanks for your response where i can find the exemple (if you did) ? > > Michael. > > De : JB Onofré > Envoyé : mercredi 23 décembre 2020 11:04 > À : user@karaf.apache.org > Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 > > Hi Michael > > I will provide the updated example today (i already have a sift config ready > I will just add camel mdc). > > Regards > JB > >>> Le 23 déc. 2020 à 10:59, michael e a écrit : >>> >> >> Hello, >> >> I'm getting in trouble trying to configure MDC logging with latest Karaf and >> Camel Version >> >> Here my logging configuration >> >> log4j2.appender.routing.type = Routing >> log4j2.appender.routing.name = Routing >> log4j2.appender.routing.routes.type = Routes >> log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} >> log4j2.appender.routing.routes.bundle.type = Route >> log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile >> log4j2.appender.routing.routes.bundle.appender.name = >> Bundle-\$\\\{ctx:bundle.name\} >> log4j2.appender.routing.routes.bundle.appender.fileName = >> ${karaf.data}/log/sift-camel-\$\\\{ctx:camel.contextId\}.log >> log4j2.appender.routing.routes.bundle.appender.filePattern = >> ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i >> log4j2.appender.routing.routes.bundle.appender.append = true >> log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout >> log4j2.appender.routing.routes.bundle.appender.layout.pattern = >> ${log4j2.pattern} >> log4j2.appender.routing.routes.bundle.appender.policies.type = Policies >> log4j2.appender.routing.routes.bundle.appender.policies.size.type = >> SizeBasedTriggeringPolicy >> log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB >> >> Logging file is correctly created but i get exception in my Karaf >> >> >> karaf@root()> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : >> Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de >> fichier, de répertoire ou de volume est incorrecte >> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create >> plugin of type class >> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for >> element RollingRandomAccessFile: java.lang.IllegalStateException: >> ManagerFactory >> [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@26d9daed] >> unable to create manager for >> [D:\karaf\apache-karaf-4.3.0\data/log/sift-camel-${ctx:camel.contextId}.log] >> with data >> [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@34bd66be] >> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke >> factory method in class >> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for >> element RollingRandomAccessFile: java.lang.IllegalStateException: No factory >> method found for class >> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender >> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create >> Appender of type RollingRandomAccessFile >> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access >> RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de >> répertoire ou de volume est incorrecte >> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create >> plugin of type class >> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for >> element RollingRandomAccessFile: java.lang.IllegalStateException: >> ManagerFactory >> [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@26d9daed] >> unable to create manager for >> [D:\karaf\apache-karaf-4.3.0\data/log/sift-camel-${ctx:camel.contextId}.log] >> with data >> [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@19f28b4] >> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke >> factory method in class >> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for >> element RollingRandomAccessFile: java.lang.IllegalStateException: No factory >> method found for class >> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender >> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create >> Appender of type RollingRandomAccessFile >> >> There is updated documentation about how to configure ? >> >> Michael. >>
RE: Configuring MDC logging karaf 4 camel 3.7.0
Hi JB, Thanks for your response where i can find the exemple (if you did) ? Michael. De : JB Onofré Envoyé : mercredi 23 décembre 2020 11:04 À : user@karaf.apache.org Objet : Re: Configuring MDC logging karaf 4 camel 3.7.0 Hi Michael I will provide the updated example today (i already have a sift config ready I will just add camel mdc). Regards JB Le 23 déc. 2020 à 10:59, michael e a écrit : Hello, I'm getting in trouble trying to configure MDC logging with latest Karaf and Camel Version Here my logging configuration log4j2.appender.routing.type = Routing log4j2.appender.routing.name = Routing log4j2.appender.routing.routes.type = Routes log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.type = Route log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile log4j2.appender.routing.routes.bundle.appender.name = Bundle-\$\\\{ctx:bundle.name\} log4j2.appender.routing.routes.bundle.appender.fileName = ${karaf.data}/log/sift-camel-\$\\\{ctx:camel.contextId\}.log log4j2.appender.routing.routes.bundle.appender.filePattern = ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i log4j2.appender.routing.routes.bundle.appender.append = true log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout log4j2.appender.routing.routes.bundle.appender.layout.pattern = ${log4j2.pattern} log4j2.appender.routing.routes.bundle.appender.policies.type = Policies log4j2.appender.routing.routes.bundle.appender.policies.size.type = SizeBasedTriggeringPolicy log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB Logging file is correctly created but i get exception in my Karaf karaf@root()> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@26d9daed] unable to create manager for [D:\karaf\apache-karaf-4.3.0\data/log/sift-camel-${ctx:camel.contextId}.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@34bd66be] org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create Appender of type RollingRandomAccessFile org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@26d9daed] unable to create manager for [D:\karaf\apache-karaf-4.3.0\data/log/sift-camel-${ctx:camel.contextId}.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@19f28b4] org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create Appender of type RollingRandomAccessFile There is updated documentation about how to configure ? Michael.
Re: Configuring MDC logging karaf 4 camel 3.7.0
Hi Michael I will provide the updated example today (i already have a sift config ready I will just add camel mdc). Regards JB > Le 23 déc. 2020 à 10:59, michael e a écrit : > > > Hello, > > I'm getting in trouble trying to configure MDC logging with latest Karaf and > Camel Version > > Here my logging configuration > > log4j2.appender.routing.type = Routing > log4j2.appender.routing.name = Routing > log4j2.appender.routing.routes.type = Routes > log4j2.appender.routing.routes.pattern = \$\$\\\{ctx:bundle.name\} > log4j2.appender.routing.routes.bundle.type = Route > log4j2.appender.routing.routes.bundle.appender.type = RollingRandomAccessFile > log4j2.appender.routing.routes.bundle.appender.name = > Bundle-\$\\\{ctx:bundle.name\} > log4j2.appender.routing.routes.bundle.appender.fileName = > ${karaf.data}/log/sift-camel-\$\\\{ctx:camel.contextId\}.log > log4j2.appender.routing.routes.bundle.appender.filePattern = > ${karaf.log}/bundle-\$\\\{ctx:bundle.name\}.log.%i > log4j2.appender.routing.routes.bundle.appender.append = true > log4j2.appender.routing.routes.bundle.appender.layout.type = PatternLayout > log4j2.appender.routing.routes.bundle.appender.layout.pattern = > ${log4j2.pattern} > log4j2.appender.routing.routes.bundle.appender.policies.type = Policies > log4j2.appender.routing.routes.bundle.appender.policies.size.type = > SizeBasedTriggeringPolicy > log4j2.appender.routing.routes.bundle.appender.policies.size.size = 8MB > > Logging file is correctly created but i get exception in my Karaf > > > karaf@root()> org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : > Cannot access RandomAccessFile java.io.IOException: La syntaxe du nom de > fichier, de répertoire ou de volume est incorrecte > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create > plugin of type class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for > element RollingRandomAccessFile: java.lang.IllegalStateException: > ManagerFactory > [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@26d9daed] > unable to create manager for > [D:\karaf\apache-karaf-4.3.0\data/log/sift-camel-${ctx:camel.contextId}.log] > with data > [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@34bd66be] > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke > factory method in class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for > element RollingRandomAccessFile: java.lang.IllegalStateException: No factory > method found for class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create > Appender of type RollingRandomAccessFile > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Cannot access > RandomAccessFile java.io.IOException: La syntaxe du nom de fichier, de > répertoire ou de volume est incorrecte > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Could not create > plugin of type class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for > element RollingRandomAccessFile: java.lang.IllegalStateException: > ManagerFactory > [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$RollingRandomAccessFileManagerFactory@26d9daed] > unable to create manager for > [D:\karaf\apache-karaf-4.3.0\data/log/sift-camel-${ctx:camel.contextId}.log] > with data > [org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager$FactoryData@19f28b4] > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to invoke > factory method in class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for > element RollingRandomAccessFile: java.lang.IllegalStateException: No factory > method found for class > org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender > org.ops4j.pax.logging.pax-logging-log4j2 [log4j2] ERROR : Unable to create > Appender of type RollingRandomAccessFile > > There is updated documentation about how to configure ? > > Michael. >