AsyncLogger and System.exit() not flushing unless I explicitly call LogManager.shutdown()

2020-07-01 Thread Surendar Chandra
We're using Log4j2 2.12 with AsyncLogger and JsonAppender. If I call System.exit() from uncaught exception handler, sometimes the exception printed before calling System.exit() is not printed on the console. However, if I explicitly call LogManager.shutdown() first, I reliably get the stack trac

Re: Accessing ThreadContext via "$${ctx:ndc}" vs "${ctx:ndc}"

2020-02-20 Thread Surendar Chandra
it will simply strip > the leading $ and you will get ${ctx:ndc}. > > Ralph > > > On Feb 20, 2020, at 12:37 PM, Surendar Chandra > > wrote: > > > > I'm building a JSON log by using something like this in my xml config: > > > > > > >

Accessing ThreadContext via "$${ctx:ndc}" vs "${ctx:ndc}"

2020-02-20 Thread Surendar Chandra
I'm building a JSON log by using something like this in my xml config: If I use a single $, for one particular value, the value seems to be stuck at a constant. Other variables are fine. If I use a double $, then it seems to work in all scenarios. I guess I should be using $$ but why is it flaky

JsonLayout, KeyValuePair and level transformation

2019-11-26 Thread Surendar Chandra
Is there a way to use the following pattern as the value of a keyvalue pair? %level{TRACE=7, DEBUG=7, INFO=6, WARN=4, ERROR=3, Fatal=0} I'm trying to transform the logger level into a integer with JSON. Thanks - To unsubscribe,

JSON logging from Scala

2019-11-25 Thread Surendar Chandra
My log4j configuration is: Regardless of what I specify for objectMessageAsJsonObject, I cannot get it to produce JSON of the message: I am using org.apache.logging.log4j.scala.Logger. I tried with ObjectMessage and StringMapMessage scala> map res5: java.util.Map[String,String] = {key1=value1,

Force flush buffered events

2018-02-23 Thread Chandra
turn off the logging. — how can I achieve this? Best, Chandra On 19 Feb 2018, 2:07 PM +0530, Tungathurthi, Chandra Kiran Bharadwaj , wrote: > Oh well, OFF might just work but, I'd have to remember the logging level for > enabling it again :-/ > > > > On Fri, Feb 9, 2018

Re: Programmatic disabling/enabling loggers

2018-02-19 Thread Tungathurthi, Chandra Kiran Bharadwaj
Feb 9, 2018 at 12:17 AM, Chandra wrote: > Guys, I have a requirement for the loggers to be disabled and enabled during > my runtime. I’m assuming this can be done by Filters somehow, will need to > check the doc. > > Anyone has a better alternative

Programmatic disabling/enabling loggers

2018-02-08 Thread Chandra
Guys, I have a requirement for the loggers to be disabled and enabled during my runtime. I’m assuming this can be done by Filters somehow, will need to check the doc. Anyone has a better alternatives? Thanks, Best, Chandra

Re: Logging of logs only on demand

2018-02-05 Thread Chandra
ThreadContext + Filters is your friend :) Best, Chandra On 5 Feb 2018, 3:40 PM +0530, Kavitha Balan Nair , wrote: > Hi, > > > > Is there any way to make the loggings on demand? what happens is once the > service is started it logs with the change in time stamp even though t

Re: [External] Re: How to specify a log4j2.xml config file outside from classpath?

2018-01-24 Thread Chandra
html

Re: How to specify a log4j2.xml config file outside from classpath?

2018-01-24 Thread Tungathurthi, Chandra Kiran Bharadwaj
It's log4j.configurationFile use this property to specify external config. As in, `log4j.configurationFile=/path/to/log4j2.xml` On Wed, Jan 24, 2018 at 6:47 PM +0530, "Ralph Goers" mailto:ralph.go...@dslextreme.com>> wrote: I’d have to look at the code to be sure, but you might try configur

Re: Desire for a Gitter channel?

2017-07-18 Thread Chandra
ust my opinion, but people think otherwise and I believe some-biased opinions on Flock too[2]. thanks, Chandra [1] https://dev-s.slack.com/pricing [2] https://www.quora.com/What-are-the-pros-and-cons-of-Gitter-vs-Slack On 18 Jul 2017, 7:29 PM +0530, Marshall Schor , wrote: > what's the diff

Re: Desire for a Gitter channel?

2017-07-17 Thread Tungathurthi, Chandra Kiran Bharadwaj
Hey actually, a slack channel would fit right in. Any specific reason to choose gitter over slack ? @matt thanks & regards, Chandra From: Gary Gregory Sent: Tuesday, 18 July, 07:08 Subject: Re: Desire for a Gitter channel? To: Log4J Users List So, like a private Slack? Bah, why not, as

Re: Desire for a Gitter channel?

2017-07-17 Thread Chandra
+1 for gitter! thanks, Chandra On 18 Jul 2017, 12:05 AM +0530, Matt Sicker , wrote: > https://gitter.im/apache/home > > We can request a log4j Gitter channel for realtime chat. This could be > handy for quick questions and other things that waiting on Stack Overflow > or mailing l

Re: Custom actions on rollover

2017-05-18 Thread Chandra
Hey Ralph, I want to write a custom action as I see it’s not available. I am just looking for some place to start. that’s why I asked some kind of doc/overview of the framework that would quickly get me started. thanks, Chandra On 19 May 2017, 10:29 AM +0530, Ralph Goers , wrote: > I j

Re: Custom actions on rollover

2017-05-18 Thread Chandra
Hi Remko, I see it, the more I dig in the “rollover” strategy, the more I   discover of these “subtleties”. is there by any chance a bird’s eye view of the framework? thanks, Chandra — PS: btw, “picocli” looks like a good candidate to be used in “jvmTop (https://github.com/tckb/jvmtop)”  the

Custom actions on rollover

2017-05-18 Thread Chandra
the creating custom actions in Rollover strategy. thanks, Chandra

Re: Separate application logs from framework logs

2017-04-20 Thread Chandra
log4j2) you can define separate appenders for your application and framework loggers. some basic guide is here:  https://www.tutorialspoint.com/log4j/log4j_configuration.htm thanks, Chandra On 20 Apr 2017, 7:05 PM +0530, Sreejith S , wrote: > Hi All, > > I have an application running

Re: Max index limit in DefaultRolloverStrategy

2017-04-18 Thread Chandra
hives will be deleted on subsequent rollovers (The default value is 7). 2) Also, I’d also _recommend_ to update the Javadoc (this I can send a patch :) ) but, I think it’s not required. thanks, Chandra On 18 Apr 2017, 8:53 PM +0530, Gary Gregory , wrote: > Patches welcome ;-) > > Gary &

Re: Max index limit in DefaultRolloverStrategy

2017-04-18 Thread Chandra
Hi guys, any update on this ticket? https://issues.apache.org/jira/browse/LOG4J2-1877 thanks, Chandra On 12 Apr 2017, 12:14 AM +0530, Chandra , wrote: > Yes, that’d be great.  7 seems to too low for frequently filled logs. > And also guys, please document it. I am raising a JIRA ticket i

Re: Max index limit in DefaultRolloverStrategy

2017-04-11 Thread Chandra
Yes, that’d be great.  7 seems to too low for frequently filled logs. And also guys, please document it. I am raising a JIRA ticket in this regards ( thanks Remko for the reminder). Also yes, I have set a default purge policy, this is 90 days in our use case. Best, Chandra On 12 Apr 2017, 12:07

Max index limit in DefaultRolloverStrategy

2017-04-09 Thread Chandra
documentation (if it is, can you point me to it. may be I wasn’t paying attention). If it happened to me, perhaps it might for others. Best, Chandra [1]  https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling

Re: Log4j2.7 - Adding same appender to multiple loggers?

2016-12-04 Thread Tungathurthi, Chandra Kiran Bharadwaj
Hi Gary, I tried to see if there was any work around. unfortunately I couldn't find any. this is why I extended the standard Log4j2 to create new tags. This served my purpose. Best, Chandra Best regards, Chandra about.me/tckb From:

Re: Suggestion for docs improvement: What is a classpath?

2016-12-01 Thread Tungathurthi, Chandra Kiran Bharadwaj
project — only then you need to set the property log4j.configurationFile . I hope this makes it clear. Best, Chandra Thanks & regards, Chandra Tungathurthi +919966029604 about.me/tckb From: Arash Rouhani Kalleh Sent: Friday, December 2, 2016 0

Re: confused by log4j2 Rolling File Appender

2016-10-27 Thread Tungathurthi, Chandra Kiran Bharadwaj
p; regards, Chandra Tungathurthi From: Baron Fujimoto Sent: Friday, October 28, 2016 04:37 To: log4j-user@logging.apache.org Subject: confused by log4j2 Rolling File Appender I'm trying to configure I'm trying to configure an application (Apereo'

Log4j2.7 - Adding same appender to multiple loggers?

2016-10-10 Thread Tungathurthi, Chandra Kiran Bharadwaj
s current threadcontext to dynamically 'route' the events, the above settings should work. Has anyone had the same experience? or would like to pitch in on how to make this work ? Cheers! Chandra?

RE: Logger not found exception

2007-03-23 Thread Kailash Chandra
to disturb you. Thanks' once again -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED] Sent: Friday, March 16, 2007 8:35 PM To: Log4J Users List Subject: Re: Logger not found exception Quoting Kailash Chandra <[EMAIL PROTECTED]>: > I am using the log4j.2.8

Logger not found exception

2007-03-15 Thread Kailash Chandra
I am using the log4j.2.8.jar in my ear file Log jar file is place at my lib folder at ear level I have also set the class-path option of meta-inf file of jar file used in ear file to log4j.2.8.jar file's path But when I deploy the app on Weblogic 8.1 server it throws an exception that DOMconfigurat

Logger not found exception

2007-03-15 Thread Kailash Chandra
I am using the log4j.2.8.jar in my ear file Log jar file is place at my lib folder at ear level I have also set the class-path option of meta-inf file of jar file used in ear file to log4j.2.8.jar file's path But when I deploy the app on Weblogic 8.1 server it throws an exception that DOMconfigurat