From general-return-1727-apmail-logging-general-archive=logging.apache.org@logging.apache.org Mon Feb 6 19:29:37 2012 Return-Path: X-Original-To: apmail-logging-general-archive@www.apache.org Delivered-To: apmail-logging-general-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 499769E3C for ; Mon, 6 Feb 2012 19:29:37 +0000 (UTC) Received: (qmail 90189 invoked by uid 500); 6 Feb 2012 19:29:37 -0000 Delivered-To: apmail-logging-general-archive@logging.apache.org Received: (qmail 90137 invoked by uid 500); 6 Feb 2012 19:29:36 -0000 Mailing-List: contact general-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Logging General" List-Id: Delivered-To: mailing list general@logging.apache.org Received: (qmail 90115 invoked by uid 99); 6 Feb 2012 19:29:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 19:29:36 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of scott.deboy@gmail.com designates 209.85.215.47 as permitted sender) Received: from [209.85.215.47] (HELO mail-lpp01m010-f47.google.com) (209.85.215.47) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 19:29:31 +0000 Received: by lahc1 with SMTP id c1so4664080lah.34 for ; Mon, 06 Feb 2012 11:29:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=iq7x76jCRI06VSW3gYQtX+iJemdnbiHzvrI1gn+wadE=; b=B6v1cmYyFv1qoJSR60Y7/7ZecQlJd+f3TjL14ikbePOW/cSs/HyqSt4/LXMe7ufxPP Pia+08C/MvFUBogAT76KYSWjSNIQrzE8/RDLEZmFPqOVhz3Ywi12BFZbbO3ZrwadmjX3 rQUP1PItO7otQDkNXyFk6RmtaInufV45XKA4A= MIME-Version: 1.0 Received: by 10.152.114.169 with SMTP id jh9mr10341845lab.20.1328556549508; Mon, 06 Feb 2012 11:29:09 -0800 (PST) Received: by 10.112.20.231 with HTTP; Mon, 6 Feb 2012 11:29:09 -0800 (PST) In-Reply-To: References: <69B35595-4446-4168-83D9-DA9BD21B4F85@dslextreme.com> <87k4401g5v.fsf@v35516.1blu.de> <3D7193B6-1F8F-483D-918C-87DED73EC5D4@dslextreme.com> Date: Mon, 6 Feb 2012 11:29:09 -0800 Message-ID: Subject: Re: Log4J 2 From: Scott Deboy To: Logging General Content-Type: multipart/alternative; boundary=f46d04083a63328fe504b850adb1 --f46d04083a63328fe504b850adb1 Content-Type: text/plain; charset=ISO-8859-1 This is where a DSL is slightly handy, in order to keep the syntax pretty compact and readable...but, as I mentioned, there are limitations (building an 'around' operator is probably tricky). Scott On Mon, Feb 6, 2012 at 11:24 AM, ralph.goers @dslextreme.com < ralph.goers@dslextreme.com> wrote: > > > On Mon, Feb 6, 2012 at 11:12 AM, Scott Deboy wrote: > >> The 'Rule' interface, RuleFactory and LoggingEventFieldResolver are used >> to support expressions..simple stuff, but it works...maybe it's time to >> throw this away completely and leverage a third-party API instead? >> >> Rule, RuleFactory >> >> http://svn.apache.org/viewvc/logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/rule/ >> >> ExpressionFilter: >> >> http://svn.apache.org/viewvc/logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/filter/ >> >> LoggingEventFieldResolver: >> >> http://svn.apache.org/viewvc/logging/log4j/companions/extras/trunk/src/main/java/org/apache/log4j/spi/ >> >> > Thanks. I'll take a look at these tonight. I thought I looked through > companions at some point looking for stuff to pull in. This just may not > have been obvious or I might have decided (perhaps incorrectly) that the > RegexFilter provided similar functionality. > > If these do what I think it might make more sense to leverage Java 5/6's > ability to leverage scripting languages in a Filter. I've thought about > doing that anyway. > > Ralph > --f46d04083a63328fe504b850adb1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This is where a DSL is slightly handy, in order to keep the syntax pretty c= ompact and readable...but, as I mentioned, there are limitations (building = an 'around' operator is probably tricky).

Scott

On Mon, Feb 6, 2012 at 11:24 AM, ralph.goers @dslextreme.com <ralph.goers@dslextreme.com> wrote:


On Mon, Feb 6, 2012 at= 11:12 AM, Scott Deboy <scott.deboy@gmail.com> wrote:
The 'Rule' interface, RuleFactory and LoggingEventFieldResolver are= used to support expressions..simple stuff, but it works...maybe it's t= ime to throw this away completely and leverage a third-party API instead?
Rule, RuleFactory
http://svn.apache.org/viewvc/logging/log4j/companions/extras/tr= unk/src/main/java/org/apache/log4j/rule/

ExpressionFilter:
http://svn.apache.org/viewvc/logging/log4j/companions/extras/tr= unk/src/main/java/org/apache/log4j/filter/

LoggingEventFieldResolver:
http://svn.apache.org/viewvc/logging/log4j/companions/extr= as/trunk/src/main/java/org/apache/log4j/spi/


Thanks. I'll t= ake a look at these tonight. I thought I looked through companions at some = point looking for stuff to pull in. This just may not have been obvious or = I might have decided (perhaps incorrectly) that the RegexFilter provided si= milar functionality.

If these do what I think it might make more sense to le= verage Java 5/6's ability to leverage scripting languages in a Filter. = I've thought about doing that anyway.

Ralph=A0

--f46d04083a63328fe504b850adb1--