Re: [External] Get thrown_name from JSON appender in RollingRandomAccessFile appender

2018-08-14 Thread Ralph Goers
Is there a reason why you cannot use $ex{short.className} in your pattern? Ralph > On Aug 14, 2018, at 2:21 PM, Matt Sicker wrote: > > Sounds like a new feature then. Please file a JIRA ticket. PRs welcome! > > On Tue, 14 Aug 2018 at 01:53, Fröstl, Christian < > christian.froe...@accenture.com

Re: [External] Re: Get thrown_name from JSON appender in RollingRandomAccessFile appender

2018-08-14 Thread Matt Sicker
Sounds like a new feature then. Please file a JIRA ticket. PRs welcome! On Tue, 14 Aug 2018 at 01:53, Fröstl, Christian < christian.froe...@accenture.com> wrote: > To be more precise, I only need the name of the exception in a dedicated > field like the thrown_name in the JSON layout. > > Greetin

Re: Changing xml config file after startup

2018-08-14 Thread John Lussmyer
Ok, LOG4J2-2406 created. On Tue Aug 14 09:22:39 PDT 2018 ralph.go...@dslextreme.com said: >You don?t need to call ctx.updateLoggers(). That is done already inside the >ctx.reconfigure(). > >In short, you could shorten that to one line > >((org.apache.logging.log4j.core.LoggerContext) >LogManager

Re: Changing xml config file after startup

2018-08-14 Thread John Lussmyer
Location can change as well. When app first starts up, it'll end up using the log4j.xml that is in the .jar file. We then create (if needed) a AppName.log4j.xml file in our logs directory, and switch log4j to use that one. On Tue Aug 14 09:14:33 PDT 2018 ralph.go...@dslextreme.com said: >You ar

Re: Changing xml config file after startup

2018-08-14 Thread Ralph Goers
You don’t need to call ctx.updateLoggers(). That is done already inside the ctx.reconfigure(). In short, you could shorten that to one line ((org.apache.logging.log4j.core.LoggerContext) LogManager.getContext(false)).reconfigure(); That could certainly be added to the Configurator class as C

Re: Changing xml config file after startup

2018-08-14 Thread Ralph Goers
You are simply trying to refresh the configuration from the same location? Ralph > On Aug 14, 2018, at 8:35 AM, John Lussmyer wrote: > > Our (old) code that uses log4j does the following in order to swap xml > configurations after app initialization. > > final org.apache.loggin

Changing xml config file after startup

2018-08-14 Thread John Lussmyer
Our (old) code that uses log4j does the following in order to swap xml configurations after app initialization. final org.apache.logging.log4j.core.LoggerContext ctx = (org.apache.logging.log4j.core.LoggerContext) LogManager.getContext(false); ctx.reconfigure();

Re: Log4j2 in web Application

2018-08-14 Thread Matt Sicker
What I mean is that in my typical usage nowadays, I’m generally in Docker environments where I reuse the same config file in different applications while customizing them a little bit with environment variables (see 12factor.net for more info there). The alternative is that you can run more than o

Re: Log4j2 in web Application

2018-08-14 Thread Rajvinder Pal
Hi Matt, I am not familiar with the technical terms like global logging configs per application. Can you explain little more? I am curious to know about it. Thanks, Raj On Sun, Aug 12, 2018 at 8:30 PM, Matt Sicker wrote: > If you're only using one log4j2 config for the whole server, then it >