Out of the box, the Ironstar module should configure Monolog (if it’s installed) with default options for writing log files.

These should match what we usually do for best practices.

Ordinarily we’d get Drupal logs going to /app/logs/drupal.log by adding the following to web/sites/default/monolog.services.yml

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

services:
  monolog.handler.stream:
    class: Monolog\Handler\StreamHandler
    arguments: ['/app/logs/drupal.log', 'NOTICE', 'monolog.level.notice']

And then adding this line to web/sites/default/settings.php:

$settings['container_yamls'][] = $app_root . '/' . $site_path . '/monolog.services.yml';

If possible, the Ironstar module should automatically create this configuration so customers don’t need to add extra steps other than just simply installing and enabling the Monolog module.

This log file should be enabled by default, but customers should be able to turn it off via a config flag.

Comments

jesseh created an issue. See original summary.

avpaderno’s picture

  • jesseh committed b86e3f93 on support-default-monolog-configuration
    Issue #3530938: Provide default monolog configuration
    

  • jesseh committed ad6263fe on support-default-monolog-configuration
    Issue #3530938: Provide default monolog configuration
    

  • jesseh committed 65d323c7 on support-default-monolog-configuration
    Issue #3530938: Provide default monolog configuration
    

  • jesseh committed 0e4f56b7 on support-default-monolog-configuration
    Issue #3530938: Provide default monolog configuration
    

  • jesseh committed 34dff9d9 on support-default-monolog-configuration
    Issue #3530938: Provide default monolog configuration
    
jesseh’s picture

  • jesseh committed 9a4e3979 on 1.0.x
    Issue #3530938: Provide default monolog configuration
    
jesseh’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.