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 8D98F200BD4 for ; Thu, 17 Nov 2016 00:36:38 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8C39E160B17; Wed, 16 Nov 2016 23:36:38 +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 D360F160B08 for ; Thu, 17 Nov 2016 00:36:37 +0100 (CET) Received: (qmail 46036 invoked by uid 500); 16 Nov 2016 23:36:36 -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 46025 invoked by uid 99); 16 Nov 2016 23:36:36 -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; Wed, 16 Nov 2016 23:36:36 +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 5E8D71809D8 for ; Wed, 16 Nov 2016 23:36:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.102 X-Spam-Level: X-Spam-Status: No, score=-0.102 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com 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 UCafFCjZqZTC for ; Wed, 16 Nov 2016 23:36:34 +0000 (UTC) Received: from mail-pg0-f47.google.com (mail-pg0-f47.google.com [74.125.83.47]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 03A1A5FBD1 for ; Wed, 16 Nov 2016 23:36:34 +0000 (UTC) Received: by mail-pg0-f47.google.com with SMTP id x23so81473991pgx.1 for ; Wed, 16 Nov 2016 15:36:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-transfer-encoding:mime-version:date:subject:message-id :references:in-reply-to:to; bh=WhuY35O2QcO4GqKkSpQZktvpXUS02xtEy9YBTjdMjeQ=; b=NmRn651twuUgnhsyAcW2bEKyuvGq6ho1r0ad419FISAlmDd6xbyagtnneNwle045PV Ej1cAiXldhBXataJJdFpXS9pP6O69486dIlTBh1eLirgYIPzKSWz7Gc8txwyGaTlnSG6 7OV32noyVIqmTTyH5vxsRcCfLUYwgV45KUn/gVI8vaALL0eLvwTnR5iMWab38hx8qWuX 18E0rzhGGGl1m7Mn672qMIQGLSbPF2tZ2vX/8BF2zc7NdYIowfLE47f2cikK71ASBWDT g8yNDEVlyQV0AnIOn6hijMDkDTDJIOs69v5SapkPj83UnyPC01gI52ISFgbTBu6XT7FK IyGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-transfer-encoding:mime-version:date :subject:message-id:references:in-reply-to:to; bh=WhuY35O2QcO4GqKkSpQZktvpXUS02xtEy9YBTjdMjeQ=; b=CrFKCdmn+riHASNoyiA0illsbAmrOG4Xk8YQoDAUwajQwkNiFxXEP8Q4VJg+a/h+Qb BQyErVHZt1ZvHRW8toAb5DfS7SGz/EBHV+Rtt9aGxGmlxK3s+CeDng4ejykcNBA34y3Y qarw76NxNZjGpcWVnZTtOI/jQbZ3iViY6JpAzAt4pY0jp4fmTGu86iASE4JxmVWP8zZr DHCKtp12cHBe29Wpcxqnu49hcA5QFT2kp0e7asdvib0qFxIzIAHTQh1cHj3sWs+44Zxr KccJTYFqABvPSCBcK2Uqt/7sZzmxWxAb40rXfKvLjMzL8jEVh/QGswf8g528DW4wRW+Y 71yA== X-Gm-Message-State: ABUngveivWXfXckuOdbNCepUS+N8/GXp/N3YSSrwD2EXva8E70nSf5p3rRBequ+te+ua6g== X-Received: by 10.99.218.85 with SMTP id l21mr413674pgj.102.1479339387321; Wed, 16 Nov 2016 15:36:27 -0800 (PST) Received: from [192.168.1.10] (115-179-87-3.tokyo.ap.gmo-isp.jp. [115.179.87.3]) by smtp.gmail.com with ESMTPSA id 186sm195306pfv.61.2016.11.16.15.36.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Nov 2016 15:36:26 -0800 (PST) From: Remko Popma Content-Type: text/plain; charset=shift_jis Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Date: Thu, 17 Nov 2016 08:36:24 +0900 Subject: Re: [log4j 1.x] Batch-sending with SMTPAppender Message-Id: <756CE4D2-A854-43BE-8A3B-20D14DEAA44B@gmail.com> References: <51df962f-3c7c-d4ba-2f12-b96553a2211f@christopherschultz.net> <1F899ABE-8115-45DF-98B8-3CBCD0853D83@dslextreme.com> <39a3e6d1-dcc2-2da7-8bc9-8c014781834c@christopherschultz.net> In-Reply-To: <39a3e6d1-dcc2-2da7-8bc9-8c014781834c@christopherschultz.net> To: Log4J Users List X-Mailer: iPhone Mail (14B100) archived-at: Wed, 16 Nov 2016 23:36:38 -0000 Chris, Are you aware that there is a log4j-1.2-api adapter included in Log4j2 that a= llows you to keep your application code unchanged (unless you rely on the in= nards of Log4j 1.2)? You only need to change the configuration (the manual has tons of examples).= =20 Just FYI.=20 Remko Sent from my iPhone > On 17 Nov 2016, at 7:33, Christopher Schultz wrote: >=20 > Scott, >=20 > On 11/16/16 2:09 PM, Scott Harrington wrote: >>>>> On 11/16/16 9:49 AM, Ralph Goers wrote: >>>>> First, I have to say that Log4j 1 reached end-of-life over a year >>>>> ago. We recommend you upgrade to Log4j 2. >>>>=20 >>>> Fair enough. I'm not quite there, yet. I suspect that log4j 2 will have= >>>> the same issue, though. >>>=20 >>> I don=81ft know how to configure a TriggeringEventEvaluator in Log4j 1 >>> but I=81fd bet google does ;-) >>=20 >> Chris: I have a ThrottledSMTPApppender subclass that I used for years >> under Log4j 1.x, it's very small but was somewhat tricky; it starts a >> "flusher" thread and attaches a shutdown hook to drain before exit. >> There is a TriggeringEventEvaluator that always returns false. There is >> a configureable "initialDelay" (default 10 seconds) and >> "messageInterval" (default 60 seconds). >=20 > That sounds cool, but maybe overkill if I can get the > TriggeringEventEvaluator working with the stock log4j distro. >=20 > (It looks like I'll need to write my own NeverTriggerEventEvaluator to > do that. It looks trivial so I'll try that first.) >=20 >> I've since moved up to Log4j 2, and you are correct that Log4j 2 didn't >> do throttling/batching quite like I wanted, so I have a "ThrottledSMTP" >> Plugin for Log4j 2. >=20 > :) >=20 >> There was some discussion of this at LOG4J2-252, which is still open. >> I'll attach my two variants to that ticket with the hope they may be >> useful as-is to you or to others. However I don't have the time in >> foreseeable future to prepare the proper unit test and documentation >> that would be required to make it part of official Log4j2. >=20 > Understood. If I (a) go down the ThrottledSMTPAppender route and (b) > move to log4j 2, I may finish-off that work. It's a long-shot, though. >=20 > I really appreciate the feedback, though. >=20 > -chris >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org