drupal-project icon indicating copy to clipboard operation
drupal-project copied to clipboard

Configure monolog as default

Open Juhani-moilanen opened this issue 3 years ago • 0 comments

Add monolog config so that all new projects use it by default

  • add "monolog.services.yml" to sites/default/
  • use "monolog.services.yml" in settings.php

"monolog.services.yml"

parameters:
  monolog.channel_handlers:
    default: ['stream']
  monolog.processors: ['message_placeholder', 'current_user', 'request_uri', 'ip', 'referer']

services:
  monolog.handler.stream:
    class: Monolog\Handler\StreamHandler
    arguments: ['php://stderr', 10, 'monolog.level.debug']

This will spit out Drupal logs so that sumologic can get them

in settings.php $settings['container_yamls'][] = 'sites/default/monolog.services.yml';

I think it would be nice if every env used monolog by default and for lando maybe add something similar to Vantaa projects lando devel-enable that would enable modules that help with local development and debugging

Juhani-moilanen avatar Jul 19 '22 10:07 Juhani-moilanen