Skip to content

Commit

Permalink
chore(docker): update logs configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mborne committed Dec 3, 2024
1 parent 77cbb17 commit 7780a8b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
42 changes: 25 additions & 17 deletions config/packages/monolog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,32 @@ 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
channels: ["!event", "!doctrine", "!console"]

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:
Expand All @@ -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
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7780a8b

Please sign in to comment.