Closed (fixed)
Project:
Ironstar
Version:
1.0.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
19 Jun 2025 at 07:42 UTC
Updated:
7 Sep 2025 at 04:34 UTC
Jump to comment: Most recent
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
Comment #2
avpadernoComment #8
jesseh commentedComment #10
jesseh commented