Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-28139

Improve Cloud Docker image logging

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11.1, 2021.0
    • Component/s: CI/CD

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 2 hours
                  2d 2h