From log4j-user-return-28994-archive-asf-public=cust-asf.ponee.io@logging.apache.org Wed Jul 25 18:44:50 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 14B4418062C for ; Wed, 25 Jul 2018 18:44:49 +0200 (CEST) Received: (qmail 3000 invoked by uid 500); 25 Jul 2018 16:44:48 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 2988 invoked by uid 99); 25 Jul 2018 16:44:48 -0000 Received: from ui-eu-01.ponee.io (HELO localhost) (176.9.59.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2018 16:44:48 +0000 X-Mailer: LuaSocket 3.0-rc1 In-Reply-To: References: To: From: Leon Finker Content-Type: text/plain; charset=utf-8 Date: Wed, 25 Jul 2018 16:44:47 -0000 x-ponymail-sender: 37dac5eb3044a9c143279b6f9cc836443c7d97c2 x-ponymail-agent: PonyMail Composer/0.3 MIME-Version: 1.0 Subject: log4j2 under OSGi application Message-ID: Hi, Use case: provide log4j2 logging in Felix OSGi application. Nothing OSGi specific as far as logging concerned. Simply need to log all logging events to configured log file for the application. Using async logging. If we run log4j2 (any current version) with default context selector, then we noticed that each OSGi bundle creates a separate AsyncLoggerConfig* thread with its own Disruptor, RingBuffer, etc. We have about 30+ bundles. Only by setting Log4jContextSelector to org.apache.logging.log4j.core.selector.BasicContextSelector, this is prevented and one AsyncLoggerConfig/Disruptor/RingBuffer is created. Is this expected? --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org