Provide default monolog configuration

Created on 19 June 2025, 4 months ago
Updated 25 June 2025, 4 months ago

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 by adding the following to

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 :

$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.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇦🇺Australia jesseh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024