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 4907E108CF for ; Wed, 24 Jul 2013 15:37:31 +0000 (UTC) Received: (qmail 56202 invoked by uid 500); 24 Jul 2013 15:37:30 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 56160 invoked by uid 500); 24 Jul 2013 15:37:30 -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 56152 invoked by uid 99); 24 Jul 2013 15:37:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jul 2013 15:37:30 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_FRT_PROFIT1 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of garydgregory@gmail.com designates 209.85.214.44 as permitted sender) Received: from [209.85.214.44] (HELO mail-bk0-f44.google.com) (209.85.214.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jul 2013 15:37:26 +0000 Received: by mail-bk0-f44.google.com with SMTP id 6so245333bkj.17 for ; Wed, 24 Jul 2013 08:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=w4eMGjdMiJTygKiIboQKYxfACzVIHHgdNHJsuaIKOzc=; b=y9+S07J9XBw156mUZtVEwR7QpXl5zIx3LpC5STMJs3NTQxJbGR5KAY2Ts0dMSGXz7i tsJdWDspRQ65i3/wtjrPMBskI0EFCy75kEcOoAgcCiq/6chg1F/ciqbJuKmz3GJCreVb qHo4pcDGYpkWJQ7PYyIgVjZzm6Uujj7ZrjlKfxxvWYEZ6MAcrhrfgk4ICBGm8vTXa+lX WhSrgla7nB4GB/cHhxk0a+UtM8h6A3UWGB1Ipzc8zJYjQI8WFprsnKqkErcPcxO7c4Q6 t1sGUKTKAHXpodQ8iTDxo4onBy6go0y4xnt/uYcsMoOgaxQZ8nw+5g+WPhiK+4lsjNwE T4fQ== MIME-Version: 1.0 X-Received: by 10.205.77.132 with SMTP id zi4mr823298bkb.163.1374680225170; Wed, 24 Jul 2013 08:37:05 -0700 (PDT) Received: by 10.204.187.11 with HTTP; Wed, 24 Jul 2013 08:37:05 -0700 (PDT) In-Reply-To: <1374617823.50417.YahooMailNeo@web120501.mail.ne1.yahoo.com> References: <40FC8698D6100D459BEBAF60E30E2EEA3719CB6E@GAALPA1MSGUSR9G.ITServices.sbc.com> <8984B4E5-2859-438A-A349-8C0B0ED542D1@nicholaswilliams.net> <64574704-7E36-4DE2-BB72-B6ABDABF7FC2@dslextreme.com> <1374616602.16904.YahooMailNeo@web120501.mail.ne1.yahoo.com> <82085430721452707@unknownmsgid> <1374617823.50417.YahooMailNeo@web120501.mail.ne1.yahoo.com> Date: Wed, 24 Jul 2013 11:37:05 -0400 Message-ID: Subject: Re: Config additions, WAS: Confused: want low latency: do I need BOTH async logger AND async appender?? From: Gary Gregory To: Log4J Developers List , Remko Popma Content-Type: multipart/alternative; boundary=f46d041555e48082d804e243ae34 X-Virus-Checked: Checked by ClamAV on apache.org --f46d041555e48082d804e243ae34 Content-Type: text/plain; charset=UTF-8 On Tue, Jul 23, 2013 at 6:17 PM, Remko Popma wrote: > Understood about CamelCase, not a problem. > Maybe AsyncLoggers is a better element name anyway. How does this look? > > Log4jContextSelector="org.apache.logging.log4j.core.async.AsyncLoggerContextSelector"> > waitStrategy="Block" /> > > > > Sorry, I don't remember what email from Simo you are referring to. > Please read https://mail-archives.apache.org/mod_mbox/logging-log4j-dev/201306.mbox/%3CCAAqLGLNpLiZRP_8SJXcttYutVHJFNuqNxvr3HruaLpKaG12FvA@mail.gmail.com%3E Gary > > > ------------------------------ > *From:* Gary Gregory > > *To:* Log4J Developers List > *Sent:* Wednesday, July 24, 2013 7:07 AM > > *Subject:* Re: Config additions, WAS: Confused: want low latency: do I > need BOTH async logger AND async appender?? > > What is up with the dashes in element names? That is unsightly IMO. I know > that we have some - IMO unnecessary - flexibility in our config code to > make XML case insensitive but dashes we have in there now make it > impossible to make the XML look decent. If it were just me I would use > CamelCase for element names (like class names) and camelCase for attribute > names (like instance variable names). > > Simo has emailed about a different approach to configuration. Does anyone > have comments on that btw? I know, I should start a different thread... > > Gary > > On Jul 23, 2013, at 17:57, Remko Popma wrote: > > After looking at your changes for LOG4J2-318 to > add the shutdownHookEnabled attribute I understand a bit better. > > Here is a list of properties that can be used to configure AsyncLoggers > when all loggers are Async: > * > Log4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector > * AsyncLogger.ExceptionHandler > * AsyncLogger.RingBufferSize > * AsyncLogger.WaitStrategy > * log4j.Clock - currently only used for timestamping RingBufferLogEvents. > Should all LogEvents > > The following system properties can be used to configure mixed Async > Loggers: > * AsyncLoggerConfig.ExceptionHandler > * AsyncLoggerConfig.RingBufferSize > * AsyncLoggerConfig.WaitStrategy > > For JMX there is only the one "disable" property, which Gary suggested to > make into an element rather than an attribute to future-proof it. > > So, should the result look something like this? > > Log4jContextSelector="org.apache.logging.log4j.core.async.AsyncLoggerContextSelector"> > waitStrategy="Block" /> > > > > > *From:* Ralph Goers > *To:* Log4J Developers List > *Sent:* Wednesday, July 24, 2013 2:38 AM > *Subject:* Re: Config additions, WAS: Confused: want low latency: do I > need BOTH async logger AND async appender?? > > What don't you know? I'd be happy to help with that :-) > > Ralph > > > On Jul 23, 2013, at 9:20 AM, Remko Popma wrote: > > > I wouldn't mind doing this but don't know how. > > > > Remko > > > > Sent from my iPhone > > > > On 2013/07/24, at 0:46, Nick Williams > wrote: > > > >> 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 > >>> > >>> 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? > >>> > >>> 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. > >>> > >>> 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 > >>> > >>> Tnx curt > >>> > >>> Curt Smith > >>> AT&T Digital Life > >>> DLC Software Development > >>> 404-499-7013 > >>> (cell) 678-365-6508 > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org > >> For additional commands, e-mail: log4j-dev-help@logging.apache.org > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org > > For additional commands, e-mail: log4j-dev-help@logging.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org > For additional commands, e-mail: log4j-dev-help@logging.apache.org > > > > > -- E-Mail: garydgregory@gmail.com | ggregory@apache.org Java Persistence with Hibernate, Second Edition JUnit in Action, Second Edition Spring Batch in Action Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory --f46d041555e48082d804e243ae34 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On T= ue, Jul 23, 2013 at 6:17 PM, Remko Popma <remkop@yahoo.com> w= rote:
Understood about Came= lCase, not a problem.
Maybe AsyncLoggers is a better element name anyway. How does this look= ?
<configuration level=3D"warn"=C2= =A0Log4jContextSelector=3D"org.apache.logging.log4j.core.async.= AsyncLoggerContextSelector">
=C2=A0 <AsyncLogger= s exceptionHandler=3D"my.custom.Handler"=C2=A0ringBufferSize=3D&q= uot;128" waitStrategy=3D"Block" />
=C2=A0 <jmx enabled=3D"true" />
</configuration>
Sorry, I don't remember what email from Simo y= ou are referring to.

Gary
=C2=A0



From: Gary Gregory <garydgregory@gmail.com>

To: Log4J Developers Li= st <lo= g4j-dev@logging.apache.org>
Sent: Wednesday, July 24, 2013 7:07 AM

Subject:<= /b> Re: Config additions, WAS: Confused: want low latency: do I need BOTH async logger AND async appender??

What is up with the dashes in element= names? That is unsightly IMO. I know that we have some - IMO unnecessary = =C2=A0- flexibility in our config code to make XML case insensitive but das= hes we have in there now make it impossible to make the XML look decent. If= it were just me I would use CamelCase for element names (like class names)= and camelCase for attribute names (like instance variable names).=C2=A0

Simo has emailed about a different approach to configur= ation. Does anyone have comments on that btw? I know, I should start a diff= erent thread...

Gary

On Jul 23, 2013, at 17:57, Remko = Popma <remkop@yahoo.com> wrote:

After looking at your changes for=C2= =A0LOG4J2-318=C2=A0to add the shutdownHookEnabled = attribute I understand a bit better.

=
Here is a list of properti= es that can be used to configure AsyncLoggers when all loggers are Async:
* Log4jContextSelector=3Dorg.apache.logging.log4j.core.async.AsyncLoggerCont= extSelector
* AsyncLogger.E= xceptionHandler
* AsyncLogg= er.RingBufferSize
* AsyncLogger.WaitStrategy
=
* log4j.Clock - currently only used for= timestamping RingBufferLogEvents. Should all LogEvents=C2=A0
<= div style=3D"font-size:10pt">
The following system p= roperties can be used to configure mixed Async Loggers:
= * AsyncLoggerConfig.ExceptionHandler <= /span>
* AsyncLoggerConfig.RingBufferSize
* AsyncLoggerConfig.WaitStrategy

For JMX there is only the on= e "disable" property, which Gary suggested to make into an elemen= t rather than an attribute to future-proof it.
<= br>
So, should the result look something like th= is?

<configuration level=3D&q= uot;warn"=C2=A0Log= 4jContextSelector=3D"org.apache.logging.log4j.core.async.AsyncLoggerCo= ntextSelector">
=C2=A0 <async-configuration exceptionHandler=3D"my.custom.Handler"=C2=A0ringBufferSize=3D"128" waitStrategy=3D&q= uot;Block" />
</configuration>


From: Ralph Goers <= ralph.goers@dslextreme.com>
To: Log4J Developers List &= lt;log4j-dev@logging.apache.org>
Sent: Wednesday, July 24, 2013 2:38 AM
Subject: Re: Config additio= ns, WAS: Confused: want low latency: do I need BOTH async logger AND async = appender??

What don't you know?=C2=A0 I'= ;d be happy to help with that :-)

Ralph


On Jul 23, 2013, at 9:20 AM, Remko Popma wrote:
> I wouldn't mind doing this but don't know how.
>
> Remko
>
> Sent from my iPhone
> =
> On 2013/07/24, at 0:46, Nick Williams <nicholas@nichol= aswilliams.net> wrote:
>
>> 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 co= nfig element for JMX so that you don't have to use properties in this m= anner. 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 conf= igured properly.
>>
>> My $0.02.
>>
>> Nick
>> <= br>>> On Jul 23, 2013, at 10:39 AM, SMITH, CURTIS wrote:
>> =
>>> http://logging.apache.org/log4j/= 2.x/manual/async.html
>>>
>>> This URL describes that v2 has both async log= ger and async appender.=C2=A0 What is the suggested config for an embedded= situation where I want low latency, nothing fancy?
>>>
>= ;>> I've had do this in code since we don't own the cmd line:= =C2=A0 OSGi and system vendor owns the box and java command line.
>>>
>>> System.setProperty("AsyncLoggerContextSe= lector", "org.apache.logging.log4j.core.async.AsyncLoggerContextS= elector");
>>> System.setProperty("AsyncLogger.RingBu= fferSize", "128");=C2=A0 =C2=A0 =C2=A0 =C2=A0 // min size pe= rmissable to keep memory low
>>> System.setProperty("AsyncLogger.WaitStrategy", "= ;Block");=C2=A0 =C2=A0 =C2=A0 =C2=A0 // less CPU, better for embedded = env
>>> System.setProperty("log4j2.disable.jmx", "true");=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // saves on a jmx jar and we= don't use JMX anyway
>>>
>>> Tnx curt
>= >>
>>> Curt Smith
>>> AT&T Digital Life
>>> DLC Software Development=
>>> 404-499-7013
>>> (cell) 678-365-6508
>&g= t;
>>
>> ----------------------------------------------= -----------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@= logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>
> ---------------------------------------------------------------------
&= gt; To unsubscribe, e-mail: log4j-dev-unsubscribe@loggi= ng.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.a= pache.org
>


----------------------------------------------------------= -----------
To unsubscribe, e-mail: log4j-dev-unsubs= cribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache= .org




=



--
--f46d041555e48082d804e243ae34--