From 7780a8b6e051f31f90e351915864b48b8f754593 Mon Sep 17 00:00:00 2001 From: MBorne Date: Tue, 3 Dec 2024 11:34:24 +0100 Subject: [PATCH] chore(docker): update logs configuration --- config/packages/monolog.yaml | 42 +++++++++++++++++++++--------------- docker-compose.yml | 4 ++-- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/config/packages/monolog.yaml b/config/packages/monolog.yaml index e72317d..9db7d8a 100644 --- a/config/packages/monolog.yaml +++ b/config/packages/monolog.yaml @@ -10,6 +10,14 @@ when@dev: path: "%kernel.logs_dir%/%kernel.environment%.log" level: debug channels: ["!event"] + # uncomment to get logging in your browser + # you may have to allow bigger header sizes in your Web server configuration + #firephp: + # type: firephp + # level: info + #chromephp: + # type: chromephp + # level: info console: type: console process_psr_3_messages: false @@ -17,17 +25,17 @@ when@dev: when@test: monolog: - handlers: - main: - type: stream - path: "%kernel.logs_dir%/%kernel.environment%.log" - level: debug - deprecation: - path: "%kernel.logs_dir%/deprecation.log" - channels: ["deprecation"] - type: rotating_file - max_files: 1 - + handlers: + main: + type: fingers_crossed + action_level: error + handler: nested + excluded_http_codes: [404, 405] + channels: ["!event"] + nested: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug when@prod: monolog: @@ -46,9 +54,9 @@ when@prod: console: type: console process_psr_3_messages: false - channels: ["!event", "!doctrine", "!deprecation"] - # deprecation: - # type: stream - # channels: [deprecation] - # path: php://stderr - # formatter: monolog.formatter.json + channels: ["!event", "!doctrine"] + deprecation: + type: stream + channels: [deprecation] + path: php://stderr + formatter: monolog.formatter.json diff --git a/docker-compose.yml b/docker-compose.yml index 2f191a1..f229ac7 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,8 +16,8 @@ services: - http_proxy=${HTTP_PROXY} - https_proxy=${HTTPS_PROXY} - APP_ENV=${APP_ENV} - - DB_CREATE=${DB_CREATE:-1} - - DB_UPGRADE=${DB_UPGRADE:-1} + - DB_CREATE=${DB_CREATE:-0} + - DB_UPGRADE=${DB_UPGRADE:-0} - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database:5432/validator_api?serverVersion=13&charset=utf8