Re: Not able to get logging printout to console, email etc

2019-04-29 Thread Ralph Goers
I am not sure where to begin. Your log4j2.xml looks fine. You should not be using a log4j.properties if you are using Log4j 2. The configuration for the JDBC API layer looks like it is for Logback. We don’t recommend using more than one logging implementation at a time. I am not sure why you a

Fw: Not able to get logging printout to console, email etc

2019-04-29 Thread Karen Goh
Hi, I would like to know why am I not getting a reply for my question. Anyway, I would like to add that I have now changed to maven web app. And here's my log4j2.xml file ;

Re: How to have a separate log file for a thread and all sub threads?

2019-04-29 Thread Ralph Goers
You don’t. Each LoggerContext has its own hierarchy of Loggers. You would set the log level on the LoggerContext’s root Logger. Ralph > On Apr 29, 2019, at 12:18 PM, Benjamin Jaton wrote: > > Yes I've explored that route a little bit, inspired by the existing > ClassLoaderContextSelector imple

Re: How to have a separate log file for a thread and all sub threads?

2019-04-29 Thread Matt Sicker
On Mon, 29 Apr 2019 at 14:18, Benjamin Jaton wrote: > One thing I'm not sure about is how do you "set" the log level on a whole > LoggerContext? Take a look at Configurator. For example: https://github.com/apache/logging-log4j2/blob/58d96d0e242eac260d5fe2317e54a6fc24332994/log4j-core/src/main/jav

Re: How to have a separate log file for a thread and all sub threads?

2019-04-29 Thread Benjamin Jaton
Yes I've explored that route a little bit, inspired by the existing ClassLoaderContextSelector implementation. One thing I'm not sure about is how do you "set" the log level on a whole LoggerContext? On Mon, Apr 29, 2019 at 12:03 PM Ralph Goers wrote: > If you created a ThreadGroupContextSelect

Re: How to have a separate log file for a thread and all sub threads?

2019-04-29 Thread Ralph Goers
If you created a ThreadGroupContextSelector it probably would perform better, but you might be trading one set of problems for another. Ralph > On Apr 29, 2019, at 11:58 AM, Benjamin Jaton wrote: > > I ended up making a DynamicThreadholdFilter to be able to resolve the log > level dynamically.

Re: How to have a separate log file for a thread and all sub threads?

2019-04-29 Thread Benjamin Jaton
I ended up making a DynamicThreadholdFilter to be able to resolve the log level dynamically. What's not so great is that this management of the log level with a "post" filter requires the logger to let everything through (TRACE). So then methods like isDebugEnabled() will always return true. Anyw

Re: How to have a separate log file for a thread and all sub threads?

2019-04-29 Thread Matt Sicker
Requiring the use of ThreadContext data everywhere can slow things down a little, though not sure by how much. On Thu, 25 Apr 2019 at 13:35, Benjamin Jaton wrote: > > I've used ThresholdFilter to have the log level check at the level of the > (sub) appender: > > "ThresholdFilter