Skip to content

Commit

Permalink
Merge pull request #187 from City-of-Helsinki/UHF-10944-add-raven-log…
Browse files Browse the repository at this point in the history
…ging-back

UHF-10944: Add sentry logger back
  • Loading branch information
hyrsky authored Nov 8, 2024
2 parents d149db1 + 540266b commit bfada1e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/HelfiApiBaseServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ public function register(ContainerBuilder $container) : void {
$container->setParameter('monolog.channel_handlers', [
'default' => [
'handlers' => [
[
// The Raven logger handler must be added to forward log messages
// to Sentry. We remove the `message_placeholder` processor from
// the default processors, as Raven already handles placeholders.
// NOTE: The `filter_backtrace` processor should be included.
// Without it, logging long backtraces may lead to out-of-memory
// errors.
'name' => 'drupal.raven',
'processors' => [
'current_user',
'request_uri',
'ip',
'referer',
'filter_backtrace',
],
],
[
'name' => 'default_conditional_handler',
'formatter' => 'drush_or_json',
Expand Down

0 comments on commit bfada1e

Please sign in to comment.