From b855f044a26f9f4b33bcd11929b6b2764c4fe5bd Mon Sep 17 00:00:00 2001 From: Bart Geesink Date: Fri, 8 Nov 2024 14:49:58 +0100 Subject: [PATCH] Docker: Log to json, fixes multiline logging in Docker --- docker/Dockerfile.prod | 2 +- docker/conf/logging.yml | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/docker/Dockerfile.prod b/docker/Dockerfile.prod index c8e17f5a7..0cc9bfce9 100644 --- a/docker/Dockerfile.prod +++ b/docker/Dockerfile.prod @@ -13,7 +13,7 @@ RUN tar -xvjf /tmp/*.tar.bz2 -C /var/www/html/ && \ # Add the config files for Apache2 RUN rm -rf /etc/apache2/sites-enabled/* COPY ./docker/conf/engine.conf /etc/apache2/sites-enabled/engine.conf -COPY ./docker/conf/logging.yml /var/www/html/config/packages/ +COPY ./docker/conf/logging.yml /var/www/html/app/config/logging.yml # Instantiate devconf config RUN cp app/config/parameters.yml.docker app/config/parameters.yml diff --git a/docker/conf/logging.yml b/docker/conf/logging.yml index 87bb4c4b2..b258eac5a 100644 --- a/docker/conf/logging.yml +++ b/docker/conf/logging.yml @@ -5,18 +5,15 @@ monolog: type: fingers_crossed activation_strategy: engineblock.logger.manual_or_error_activation_strategy passthru_level: "%logger.fingers_crossed.passthru_level%" + channels: [!authentication] handler: stderr - channels: ["!authentication"] - stderr: - type: stream - path: php://stderr - ident: "%logger.syslog.ident%" - formatter: engineblock.logger.additional_info_formatter authentication: type: stream path: php://stderr - ident: EBAUTH - facility: user level: INFO channels: [authentication] formatter: engineblock.logger.formatter.syslog_json + stderr: + type: stream + path: php://stderr + formatter: engineblock.logger.formatter.syslog_json