John

2014-03-28 Thread Vin Karthik
News http://wfbcivicfoundation.org/bv/w_news.php



John



RE: configuring a non-core appender in log4j2

2014-03-28 Thread Zabicki Roman (HERE/Chicago)
That did the trick. Thank you for your help.

-Original Message-
From: Zabicki Roman (HERE/Chicago) 
Sent: Friday, March 21, 2014 5:25 PM
To: Log4J Users List
Subject: RE: configuring a non-core appender in log4j2

when I build -- you've described the problem exactly. I'm building with 
maven, and we combine all of our classes and all the classes from the jars 
we're dependent on into one single jar. This single jar can, of course, only 
have 1 Log4j2Plugin.dat. I have to stick with this build/deployment strategy. I 
can't deploy multiple jars. So I will use the packages attribute and let you 
know on Monday how it goes. Thanks for pointing that out. I had read that page 
before, but I didn't get it.



-Original Message-
From: Ralph Goers [mailto:ralph.go...@dslextreme.com] 
Sent: Friday, March 21, 2014 3:56 PM
To: Log4J Users List
Subject: Re: configuring a non-core appender in log4j2

If the log4j flume jar is in the class path it should automatically be included 
as it has its own Log4j2Plugin.dat file.   However, you can always manually 
cause plugins to be located by specifying the packages attribute - see 
http://logging.apache.org/log4j/2.x/manual/configuration.html#XML.

Again though, if it is not automatically finding the Flume Appender then there 
is either something wrong in your configuration or the log4j-flume-ng jar is 
not in the classpath.

I'm curious though - when you say when I build what exactly are you building? 
 You cannot build a new jar that includes the contents of log4j-core.jar and 
the contents of other jars that also have plugins as each has their own 
Log4j2Plugin.dat and only one of them will wind up in your new jar.  To do 
that, yes you would have to run the PluginManager against the contents of your 
new jar to generate your own custom Log4j2Plugin.dat.  However, doing that is 
not recommended.  We recommend that you leave the Log4j jars alone and include 
them in your classpath.

Ralph

On Mar 21, 2014, at 12:30 PM, Zabicki Roman (HERE/Chicago) 
roman.zabi...@here.com wrote:

 Hi,
 
 I want to use a non-core appender with log4j2. In particular, I want to use 
 the apache flume appender. 
 (http://logging.apache.org/log4j/2.x/log4j-flume-ng/)
 
 When I build, I wind up with the Log4j2Plugins.dat from log4j, which doesn't 
 have support for the flume appender, so I can't register the flume appender 
 in my log4j2.xml. It seems that there's no way to register custom appender 
 classes just via log4j2.xml, and instead I have to use PluginManager to 
 register the \org\apache\logging\log4j\core\config\plugins\Log4j2Plugin.dat. 
 I can't find any examples of how to do this, let alone examples of how to 
 automate this in a build.
 
 Is it possible to register a custom appender class solely through log4j2.xml, 
 or do I need to go through the PluginManager? Whatever the answer, can 
 someone show me an example? I'm particularly interested in how to automate 
 this in a build.
 
 
 Thanks,
 Roman
 
 


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Running disruptor async performance tests

2014-03-28 Thread Rebecca Ahlvarsson
I am trying to run the async performance tests described on the link below
on my machine.

http://logging.apache.org/log4j/2.x/manual/async.html#Asynchronous_Logging_Performance

I am not an expert with log4j, so here is how far I got after building
log4j with maven:

java -cp
target/classes:target/test-classes:lib/disruptor-3.2.1.jar:../log4j-api/target/classes
org.apache.logging.log4j.core.async.perftest.PerfTest
org.apache.logging.log4j.core.async.perftest.RunLog4j2 blah blah.log 1
-verbose

Then I get this in the output:

avg=17 99%=32 99.99%=64 sampleCount=500
9962247 operations/second

The questions I have are:

1. It looks like the source code IPerfTestRunner uses a much shorter
message Short Msg instead of the 500 characters message stated in the
link above. Is that intentional or is it a bug? Do we want to test the
latency with the 500-character message or just a short message?

2. I notice that my logs are NOT going to any file. I am probably
misconfiguring something with log4j. How do I generate a file with the
messages from the performance test?

3. I just want to test with one asynchronous logging thread, so I am
passing threadCount 1 above. What does the second parameter 'blah' mean?

4. Not sure why I get operations/seconds if I am not passing -throughput in
the command-line. I just want to get the latency numbers for now. After
that I will worry about throughput.

So basically I just want to run the same test you run to see those great
numbers on my production machine.

Thanks for the help!

-Becky


Re: Running disruptor async performance tests

2014-03-28 Thread Matt Sicker
Going to guess Remko has something useful to say on this, but since he's in
Japan, just wait a bit for the timezones to make sense.


On 28 March 2014 22:03, Rebecca Ahlvarsson rahlvars...@gmail.com wrote:

 I am trying to run the async performance tests described on the link below
 on my machine.


 http://logging.apache.org/log4j/2.x/manual/async.html#Asynchronous_Logging_Performance

 I am not an expert with log4j, so here is how far I got after building
 log4j with maven:

 java -cp

 target/classes:target/test-classes:lib/disruptor-3.2.1.jar:../log4j-api/target/classes
 org.apache.logging.log4j.core.async.perftest.PerfTest
 org.apache.logging.log4j.core.async.perftest.RunLog4j2 blah blah.log 1
 -verbose

 Then I get this in the output:

 avg=17 99%=32 99.99%=64 sampleCount=500
 9962247 operations/second

 The questions I have are:

 1. It looks like the source code IPerfTestRunner uses a much shorter
 message Short Msg instead of the 500 characters message stated in the
 link above. Is that intentional or is it a bug? Do we want to test the
 latency with the 500-character message or just a short message?

 2. I notice that my logs are NOT going to any file. I am probably
 misconfiguring something with log4j. How do I generate a file with the
 messages from the performance test?

 3. I just want to test with one asynchronous logging thread, so I am
 passing threadCount 1 above. What does the second parameter 'blah' mean?

 4. Not sure why I get operations/seconds if I am not passing -throughput in
 the command-line. I just want to get the latency numbers for now. After
 that I will worry about throughput.

 So basically I just want to run the same test you run to see those great
 numbers on my production machine.

 Thanks for the help!

 -Becky




-- 
Matt Sicker boa...@gmail.com