Skip to content
This repository was archived by the owner on Dec 18, 2021. It is now read-only.

Feat: Adding monolog bundle for mercure logs #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"symfony/dotenv": "^5.2",
"symfony/flex": "^1.11.0",
"symfony/framework-bundle": "^5.2",
"symfony/monolog-bundle": "^3.7",
"symfony/string": "^5.2",
"symfony/yaml": "^5.2"
},
Expand Down
264 changes: 262 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
];
12 changes: 12 additions & 0 deletions config/packages/dev/monolog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event"]
buffer_size: 50
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]
8 changes: 8 additions & 0 deletions config/packages/prod/deprecations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# As of Symfony 5.1, deprecations are logged in the dedicated "deprecation" channel when it exists
#monolog:
# channels: [deprecation]
# handlers:
# deprecation:
# type: stream
# channels: [deprecation]
# path: php://stderr
7 changes: 7 additions & 0 deletions config/packages/prod/monolog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: error
buffer_size: 50
12 changes: 12 additions & 0 deletions config/packages/test/monolog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
monolog:
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
Loading