Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 620241073D for ; Tue, 23 Jul 2013 15:47:25 +0000 (UTC) Received: (qmail 38966 invoked by uid 500); 23 Jul 2013 15:47:25 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 38939 invoked by uid 500); 23 Jul 2013 15:47:23 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 38927 invoked by uid 99); 23 Jul 2013 15:47:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jul 2013 15:47:22 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nicholas@nicholaswilliams.net designates 209.85.219.42 as permitted sender) Received: from [209.85.219.42] (HELO mail-oa0-f42.google.com) (209.85.219.42) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jul 2013 15:47:17 +0000 Received: by mail-oa0-f42.google.com with SMTP id j6so11698385oag.1 for ; Tue, 23 Jul 2013 08:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nicholaswilliams.net; s=nwts; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=8gFaJVAwa8NG6z8PO8E662pcndtch8MjhPoTQP/hXks=; b=EEX85xvwIMYNZMH6oC36aRle1H9UJt8dhMDDdu9AL6TAFO4QgFf/D+AEhjwwz2/3T9 Ry0TKW0O77VXRg4wl3dLjgqqymArRBWaO/5NNbTUDK/6x39fXjWE8j29varrh+OdHnx7 AHZbVtsoqF8WgAv6RTc2Sk9EAcLjBeylIzLQw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=8gFaJVAwa8NG6z8PO8E662pcndtch8MjhPoTQP/hXks=; b=k5dpHGaEh4Sn92ZCVmmTKQF70oqSZFbd2PHeCToZfz8qFSYeorCFDHytjIy4zLH/wR QipObtloi/AgkKnIXsVfpaYcPAKT0l0ed917lyUyeEHqGyeqPg1IUaPKJ+7HJKFmD7eJ wPaM37jy0e1PNpu1wO4GKxjCvbI3SIljD6tJhvGWpFA/CJLO/bVC9KXfGlvpdfHnVDzE 8uaWw6nwDT8VTDvRJe28nQA+t+7jK89lYk8mTzNfa57UThkR3FZNP9DxtBwFYPVIe/4Z 2Tk7fTyZjyDGqDFmseCOnrpLKkM+ZVkUHa9KaWLyI2lswgO60jmaBhAuJdSlAN3pI9zt +L2g== X-Received: by 10.182.181.99 with SMTP id dv3mr25566891obc.71.1374594416984; Tue, 23 Jul 2013 08:46:56 -0700 (PDT) Received: from nick.williams (ip67-90-155-66.z155-90-67.customer.algx.net. [67.90.155.66]) by mx.google.com with ESMTPSA id q8sm8621668obl.11.2013.07.23.08.46.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Jul 2013 08:46:56 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1283) Subject: Config additions, WAS: Confused: want low latency: do I need BOTH async logger AND async appender?? From: Nick Williams In-Reply-To: <40FC8698D6100D459BEBAF60E30E2EEA3719CB6E@GAALPA1MSGUSR9G.ITServices.sbc.com> Date: Tue, 23 Jul 2013 10:46:54 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <8984B4E5-2859-438A-A349-8C0B0ED542D1@nicholaswilliams.net> References: <40FC8698D6100D459BEBAF60E30E2EEA3719CB6E@GAALPA1MSGUSR9G.ITServices.sbc.com> To: Log4J Developers List X-Mailer: Apple Mail (2.1283) X-Gm-Message-State: ALoCoQl6/lpJg6zgOH9gLBf4PicpxiEo5eg4FevWYqNrJlGa0IyZSXbkv/WCXEV3epy7aAGk34mp X-Virus-Checked: Checked by ClamAV on apache.org I don't know the answer to this guy's question on the user's list, but = it brought up something interesting that we need to look at. Already (in = a separate issue) we have talked about needing a config element for JMX = so that you don't have to use properties in this manner. IMO, if there's = not a way to set these AsyncLogger configuration options in = log4j2.xml/json, that needs to be added, too. You should never have to = do System.setProperty (or -D on the command line) to get Log4j = configured properly. My $0.02. Nick On Jul 23, 2013, at 10:39 AM, SMITH, CURTIS wrote: > http://logging.apache.org/log4j/2.x/manual/async.html >=20 > This URL describes that v2 has both async logger and async appender. = What is the suggested config for an embedded situation where I want low = latency, nothing fancy? >=20 > I've had do this in code since we don't own the cmd line: OSGi and = system vendor owns the box and java command line. >=20 > System.setProperty("AsyncLoggerContextSelector", = "org.apache.logging.log4j.core.async.AsyncLoggerContextSelector"); > System.setProperty("AsyncLogger.RingBufferSize", "128"); // min = size permissable to keep memory low > System.setProperty("AsyncLogger.WaitStrategy", "Block"); // = less CPU, better for embedded env > System.setProperty("log4j2.disable.jmx", "true"); // = saves on a jmx jar and we don't use JMX anyway >=20 > Tnx curt >=20 > Curt Smith > AT&T Digital Life > DLC Software Development > 404-499-7013 > (cell) 678-365-6508 >=20 >=20 >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org