Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 87875200C83 for ; Sun, 28 May 2017 16:46:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 863A3160BB1; Sun, 28 May 2017 14:46:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CE542160BCC for ; Sun, 28 May 2017 16:46:07 +0200 (CEST) Received: (qmail 55601 invoked by uid 500); 28 May 2017 14:46:07 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 55591 invoked by uid 99); 28 May 2017 14:46:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 May 2017 14:46:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7482C1802C9 for ; Sun, 28 May 2017 14:46:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -98.702 X-Spam-Level: X-Spam-Status: No, score=-98.702 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_NUMSUBJECT=0.5, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 5ROYMpkgMGbB for ; Sun, 28 May 2017 14:46:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 211255FD29 for ; Sun, 28 May 2017 14:46:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A4FA9E0D3C for ; Sun, 28 May 2017 14:46:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 25D3021B59 for ; Sun, 28 May 2017 14:46:04 +0000 (UTC) Date: Sun, 28 May 2017 14:46:04 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-11352) duplicated/missing logs when camel-paxlogging work with pax-logging-log4j2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 28 May 2017 14:46:08 -0000 [ https://issues.apache.org/jira/browse/CAMEL-11352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16027837#comment-16027837 ] Claus Ibsen commented on CAMEL-11352: ------------------------------------- So are you saying its a issue that is fixed in pax-logging. > duplicated/missing logs when camel-paxlogging work with pax-logging-log4j2 > -------------------------------------------------------------------------- > > Key: CAMEL-11352 > URL: https://issues.apache.org/jira/browse/CAMEL-11352 > Project: Camel > Issue Type: Bug > Affects Versions: 2.17.6, 2.19.0 > Reporter: Xilai Dai > > This problem is found after switch to the karaf 4.1.x, which using pax-logging-log4j2 insteadof pax-logging-service. > I created a small test case project for reproduce this issue. https://github.com/xldai/test/tree/master/test-paxlogging-camel > The findings from me is that, when PaxLoggingConsumer class [1] work together with pax-logging-service (karaf 4.0.x), it creates new threads to process the incoming PaxLoggingEvent and using MDC to filter the possible duplicated logs from PaxAppenderProxy class [2]. > but when PaxLoggingConsumer class work together with pax-logging-log4j2, the multi thread mechanism for processing the PaxLoggingEvent will lead to duplicated/missing logs output to the camel Exchange. > Since the L63 from [3] fixed the possible duplicated logs come from PaxAppenderProxy class, I found that the multi thread mechanism and MDC checking can be removed from PaxLoggingConsumer class, then it works again as expected from my test result. > [1] https://github.com/apache/camel/blob/master/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/PaxLoggingConsumer.java#L58 > [2] https://github.com/ops4j/org.ops4j.pax.logging/blob/logging-1.9.1/pax-logging-service/src/main/java/org/ops4j/pax/logging/service/internal/PaxAppenderProxy.java#L63 > [3] https://github.com/ops4j/org.ops4j.pax.logging/blob/logging-1.9.1/pax-logging-log4j2/src/main/java/org/ops4j/pax/logging/log4j2/internal/PaxAppenderProxy.java#L63 -- This message was sent by Atlassian JIRA (v6.3.15#6346)