Thank you for the info.  Removing the -D property from our launch script
and using <AsyncRoot> and <AsyncLogger> seems to have fixed the problem!
This will work for us :-)

THANK YOU!!!

~ Joe ~


On Fri, May 11, 2018 at 8:38 PM Carter Kozak <c4kof...@gmail.com> wrote:

> I think this issue is tracked here:
> https://issues.apache.org/jira/browse/LOG4J2-2312
>
> On Fri, May 11, 2018 at 9:12 PM, Franz Wong <franzw...@gmail.com> wrote:
> > I also got the same issue when I used AsyncLoggerContextSelector. But if
> I
> > use the default selector, but changing the logger to <AsyncRoot> and
> > <AsyncLogger>, then the log generated is fine.
> >
> > -Franz
> >
> > On Sat, May 12, 2018 at 9:09 AM, Joseph Husby <husby...@umn.edu> wrote:
> >
> >> Hello!
> >>
> >> We are trying to run log4j 2.11.0 with a JSONLayout and async appender.
> >> We have set the JSONLayout properties="true" but are not getting the
> json
> >> properties.  Without the async appender, we DO get the json properties.
> >>
> >> With the default synchronous appender, the logs looks like this:
> >> , {
> >>   "thread" : "TFIS-EventQueue-pool-0",
> >>   "level" : "DEBUG",
> >>   "loggerName" : "com.leidos.atm.common.threadmonitor.ThreadMonitor",
> >>   "message" : "Heartbeat received for EventQueue",
> >>   "endOfBatch" : false,
> >>   "loggerFqcn" : "org.apache.logging.log4j.spi.AbstractLogger",
> >>   "instant" : {
> >>     "epochSecond" : 1526081799,
> >>     "nanoOfSecond" : 377000000
> >>   },
> >>   "contextMap" : { },
> >>   "threadId" : 41,
> >>   "threadPriority" : 5
> >> }
> >>
> >> But when I add -Dlog4j2.contextSelector=org.apache.logging.log4j.core.
> >> async.AsyncLoggerContextSelector then the logs look like this:
> >> , "Heartbeat received for EventQueue"
> >> , "Heartbeat received for EventQueue"
> >> , "Heartbeat received for EventQueue"
> >>
> >> even with no changes to our log4j2.xml file.  I have attached our full
> >> log4j2.xml and also the -Dlog4j2.debug output.  Here is the appender
> >> configuration:
> >> <RollingFile
> >>     name="Main"
> >>     fileName="${logDir}/tfdm.${appname}.json.log"
> >>     filePattern="${rolloverLogDir}/tfdm.${appname}.json.log.%d{
> >> yyyy-MM-dd_HHmm}{UTC}Z.gz">
> >>     <JsonLayout properties="true" complete="true" />
> >>     <Policies>
> >>         <CronTriggeringPolicy schedule="${cronRolloverSchedule}" />
> >>     </Policies>
> >> </RollingFile>
> >>
> >> I would greatly appreciate any insight on this issue!  Thank you in
> >> advance!
> >>
> >> ~ Joe ~
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> >> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>

Reply via email to