diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b7d638..c1933c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ CHANGELOG for 1.x ## v1.2.5 - (2024-04-22) ### Added - Adding scripts to the list of scripts that can be executed in `script-src` Nelmio Security recommendations config. +- Add missing sentry settings to readme Sentry configuration part ## v1.2.4 - (2024-04-22) diff --git a/README.md b/README.md index 269a60e..1325717 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,29 @@ services: factory: [ '@Smart\CoreBundle\Sentry\SentryCallback', 'getBeforeSend' ] ``` +Also declare the following in your `config/packages/monolog.yaml` : + +```yaml +when@prod: + monolog: + handlers: + # other handlers + sentry: + type: service + id: Sentry\Monolog\Handler +``` + +And define the `Sentry\Monolog\Handler` service in your services.yaml : + +```yaml +services: + # other services + Sentry\Monolog\Handler: + arguments: + $hub: '@Sentry\State\HubInterface' + $level: !php/const Monolog\Logger::ERROR +``` + ### Nelmio Security recommendations We recommand to setup a Content Security Policy in addition to the config generated by the nelmio security recipe: