Adding appenders in a custom ConfigurationFactory (log4j 2)

2012-10-18 Thread Andy Grove
Hi, I've just converted a product to use log4j 2 and it is working well apart from one thing. The product has multiple processes e.g. processA and processB running on the same host. I want them to use the same log4j.xml but write to different log files e.g. processA.log and processB.log. So

Re: Adding appenders in a custom ConfigurationFactory (log4j 2)

2012-10-18 Thread Ralph Goers
Doing what you have below seems like a very sledgehammer-like approach. If you have something you can key on it would make more sense to use either a) configure both appenders and filter them based on the process. b) use the RoutingAppender to more or less do the same as option a but in a more

Re: Adding appenders in a custom ConfigurationFactory (log4j 2)

2012-10-18 Thread Ralph Goers
One other issue that occurs to me is that you have a monitorInterval of 30 specified. if the file is updated a new XMLConfiguration will be created that will not have your custom appender in it. Ralph On Oct 18, 2012, at 8:34 AM, Ralph Goers wrote: Doing what you have below seems like a very