-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: CI/CD
-
Epic Link:
-
Tags:
-
Team:PLATFORM
-
Sprint:nxplatform 11.1.32, nxplatform 11.1.33, nxplatform 11.1.34, nxplatform 11.1.35, nxplatform 11.1.36
-
Story Points:0
Let's configure Log4j 2 to only log to the console, thus removing the file appender.
That's quite a common pattern for Docker images and one of the approaches recommended here: https://logging.apache.org/log4j/2.x/manual/cloud.html.
We should also configure Log4j 2 to use JSON logging as it is how it is configured in Nuxeo Cloud deployments. This allows to better analyze stack traces with log aggregators (Datadog).
As a first step, we want to create two Nuxeo templates docker and docker-json to address two different log4j2 configurations. For both configurations, we will duplicate the current log4j2.xml and only keep the Console appender (thus removing file appenders).
docker template will have the log4j2 configuration without file appenders and docker-json will have the log4j2 configuration without file appenders and a JSON Layout for the console appender.