Re: async logger on slow single core env performs 50% worse than log4j v1

2013-07-26 Thread Remko Popma
I don't think we've ever done any performance testing on the kind of environment you describe, so this is great feedback, thanks! First, configuration via XML instead of sys props is on the todo list. Second, you mentioned you use system property "AsyncLoggerContextSelector" to switch on AsyncL

Re: Example of Log4j ObjectRenderer

2013-07-26 Thread Gary Gregory
I would focus on version 2 if I were you because v1 is in maintenance mode. Gary On Jul 26, 2013, at 5:59, Xiaotong ZHANG wrote: > Hello all, > > Can anybody give me an example of ObjectRenderer configuration - I mean how > to configuer ObjectRenderer to appender (or sth else) programmatically?

Re: async logger on slow single core env performs 50% worse than log4j v1

2013-07-26 Thread Ralph Goers
At least on the web site. Probably in the async section. Ralph On Jul 26, 2013, at 3:28 PM, Gary Gregory wrote: > Should we report a warning if async features are enabled and java > reports a CPU count of 1? > > Gary > > On Jul 26, 2013, at 17:56, "SMITH, CURTIS" wrote: > >> LOL well that's

Re: async logger on slow single core env performs 50% worse than log4j v1

2013-07-26 Thread Gary Gregory
Should we report a warning if async features are enabled and java reports a CPU count of 1? Gary On Jul 26, 2013, at 17:56, "SMITH, CURTIS" wrote: > LOL well that's obvious now. :) It was more a case of wishful thinking and > why not give it a "try".But it's still odd that my attempts to

Re: Connection leak with JDBCAppender

2013-07-26 Thread Gary Gregory
The approach currently implemented sounds good to me. Nick, can you document the appender's behavior to avoid further confusion? Thank you, Gary On Jul 26, 2013, at 14:32, Nick Williams wrote: > Yes, this is the intended behavior, and a false-positive on the part of the > leak detection. > >

RE: async logger on slow single core env performs 50% worse than log4j v1

2013-07-26 Thread SMITH, CURTIS
LOL well that's obvious now. :) It was more a case of wishful thinking and why not give it a "try".But it's still odd that my attempts to slim it down It's still 2x worse than v1. Something else is in play. curt -Original Message- From: Ralph Goers [mailto:ralph.go...@dslextreme.

Re: async logger on slow single core env performs 50% worse than log4j v1

2013-07-26 Thread Ralph Goers
I'm curious why you are even trying to use Async anything with a single core environment (unless it is hyper-threaded). Only 1 thread can be active at a time so when you switch threads the active thread will just stop. This won't gain you any additional throughput but you will still incur the ad

RE: async logger on slow single core env performs 50% worse than log4j v1

2013-07-26 Thread SMITH, CURTIS
I removed System.setProperty("AsyncLoggerContextSelector", "org.apache.logging.log4j.core.async.AsyncLoggerContextSelector"); No change in CPU, but going from FastRollingFile to RollingFile I got back 10% of my lost CPU. Still at 40% CPU where v1 runs at 20%. I would like to get down to the eq

RE: programmatically setting level for many loggers not working for 2nd - Nth logger

2013-07-26 Thread SMITH, CURTIS
Yes that works, thanks a lot for that tip! LoggerContext ctx = (LoggerContext) LogManager.getContext(false); Configuration config = ctx.getConfiguration(); Map loggers = config.getLoggers(); for(String key : loggers.keySet()) {

Re: Connection leak with JDBCAppender

2013-07-26 Thread Nick Williams
Yes, this is the intended behavior, and a false-positive on the part of the leak detection. If the JDBCAppender has to open and close a connection and prepare the same statement for each logging event (even if it just has to borrow a connection from a pool and prepare the same statement for eac

Connection leak with JDBCAppender

2013-07-26 Thread Scott Lemke
Hello, I'm working on using the JDBCAppender and am seeing a leaked connection. I'm using Glassfish 3.1 with Jersey and Oracle using a JNDI connection for log4j. In my test app just doing a single log will reach the database fine, but then I get the leaked connection warning from Glassfish for the

async logger on slow single core env performs 50% worse than log4j v1

2013-07-26 Thread SMITH, CURTIS
I suspect a slow single core env is a new scenario for v2 and async logger. My view is that there's a mis match between v2's async logger thread design that works great on multi-core envs and this embedded slow single core env... Sooo I need to try a few different configurations to see what

Re: programmatically setting level for many loggers not working for 2nd - Nth logger

2013-07-26 Thread Ralph Goers
If I understand your question correctly, the Configuration interface has a getLoggers() call that returns a Map of all the LoggerConfig objects. Ralph On Jul 26, 2013, at 6:51 AM, SMITH, CURTIS wrote: > Oh! So you're right. That's what feed back is for. name="abc" I see the name I n

RE: programmatically setting level for many loggers not working for 2nd - Nth logger

2013-07-26 Thread SMITH, CURTIS
Oh! So you're right. That's what feed back is for.mailto:ralph.go...@dslextreme.com] Sent: Thursday, July 25, 2013 6:39 PM To: Log4J Users List Subject: Re: programmatically setting level for many loggers not working for 2nd - Nth logger I don't understand. You don't have any loggers

Example of Log4j ObjectRenderer

2013-07-26 Thread Xiaotong ZHANG
Hello all, Can anybody give me an example of ObjectRenderer configuration - I mean how to configuer ObjectRenderer to appender (or sth else) programmatically? Thanks in advance :) BR, Xiaotong -- *Xiaotong ZHANG** **| Etudiant Ingénieur EFREI *Ecole d'Ingénieurs des Technologies de l'Informat

Re: Log4j 1.2.17 creative features usage

2013-07-26 Thread Xiaotong ZHANG
Hello Gary, Thanks a lot for your suggestion :) After learning our own framework, I have decided to add some functions like recording the specific field value of specific method and object (maybe it should implement ObjectRenderer). Thanks again :) BR, Xiaotong On Thu, Jul 25, 2013 at 3:42