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
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:
> >
> >
> >
>
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
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,
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,