Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: Log to json, fixes multiline logging in Docker #1337

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 5 additions & 8 deletions docker/conf/logging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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