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 AE2A0200B25 for ; Wed, 8 Jun 2016 11:47:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ACC9A160A2E; Wed, 8 Jun 2016 09:47:24 +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 F37C5160A29 for ; Wed, 8 Jun 2016 11:47:23 +0200 (CEST) Received: (qmail 43880 invoked by uid 500); 8 Jun 2016 09:47:23 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 43871 invoked by uid 99); 8 Jun 2016 09:47:23 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2016 09:47:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 12D96DFDCC; Wed, 8 Jun 2016 09:47:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Message-Id: <18e2cd0cbf564b5d86d1ecbea2df4932@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: [CXF-6936] Make log-category for ext logging feature configurable, patch from David Karlsen applied with thanks, This closes #142 Date: Wed, 8 Jun 2016 09:47:23 +0000 (UTC) archived-at: Wed, 08 Jun 2016 09:47:24 -0000 Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 27917f3ac -> 2f56d25ec [CXF-6936] Make log-category for ext logging feature configurable, patch from David Karlsen applied with thanks, This closes #142 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/2f56d25e Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2f56d25e Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2f56d25e Branch: refs/heads/3.1.x-fixes Commit: 2f56d25eccef5e18222b9bd96083a98871e76af9 Parents: 27917f3 Author: Sergey Beryozkin Authored: Wed Jun 8 10:46:17 2016 +0100 Committer: Sergey Beryozkin Committed: Wed Jun 8 10:46:54 2016 +0100 ---------------------------------------------------------------------- .../apache/cxf/ext/logging/slf4j/Slf4jEventSender.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/2f56d25e/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/slf4j/Slf4jEventSender.java ---------------------------------------------------------------------- diff --git a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/slf4j/Slf4jEventSender.java b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/slf4j/Slf4jEventSender.java index ed22f28..db618d4 100644 --- a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/slf4j/Slf4jEventSender.java +++ b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/slf4j/Slf4jEventSender.java @@ -30,10 +30,20 @@ import org.slf4j.LoggerFactory; import org.slf4j.MDC; public class Slf4jEventSender implements LogEventSender { + private final String logCategory; + + public Slf4jEventSender(String logCategory) { + this.logCategory = logCategory; + } + + public Slf4jEventSender() { + this(null); + } @Override public void send(LogEvent event) { - String cat = "org.apache.cxf.services." + event.getPortTypeName().getLocalPart() + "." + event.getType(); + String cat = logCategory != null ? logCategory + : "org.apache.cxf.services." + event.getPortTypeName().getLocalPart() + "." + event.getType(); Logger log = LoggerFactory.getLogger(cat); Set keys = new HashSet(); try {