Hello all,
Currently I struggle to see the console logs on a OfBiz docker container
console well formatted in GCP’s log viewer.
I have:
- configured framework/base/conf/log4j to use
<JsonTemplateLayout eventTemplateUri="classpath:Log4jJsonEventTemplate.json"/>
- defined the template as
{
"timestamp": "${json:date:ISO8601}",
"severity": "${json:level:uppercase}",
"logging.googleapis.com/logger": "${json:logger}",
"logging.googleapis.com/thread": "${json:thread}",
"message": "${json:message}"
}
Yet, the log messages I see do not carry the proper severity or the logger and
thread categories/fields. Only the message seems to be recognized at this state
(at least!).
Am I doing wrong in assuming that this is already set:
log4j2.enable.templateResolvers=true
But I am not sure.
Has anyone got this to work already and maybe has a hint?
Thanks to share!
Warm regards
Carsten