logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Williams <nicho...@nicholaswilliams.net>
Subject Config additions, WAS: Confused: want low latency: do I need BOTH async logger AND async appender??
Date Tue, 23 Jul 2013 15:46:54 GMT
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


Mime
View raw message