Install
Works with Drupal: ^10.3 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
58.19 KB
MD5: 9a776b1d20406b9a1912de26c2324596
SHA-1: 902b611e42d2b8d430b284990992ed2e8d970677
SHA-256: dab1f880e307174542e10dec73d4d8caeb3b6bf898d9bcbaee607f386859ba70
Download zip
78.33 KB
MD5: 27bcd83cd2945c5b406145481356b168
SHA-1: 04e941b512706915ffada02b1bcae9cae98c0524
SHA-256: 76bf0fca8e0e21ec8ecb915959ae8a7ce7768d3b2423b319ed1b135ea2302ada
Release notes
Changes since 1.4.0-beta1
Fixed
- The logs directory is now created when it is missing. Monolog only creates a missing directory for plain paths and
file://URLs, so a handler writing toprivate://failed on its first write with "could not be opened in append mode". The module now creates the directory:- when the module is installed;
- on every cron run, whether archiving is on or off;
- when the settings form is saved, with a warning if it cannot be created;
- on existing sites through
monolog_watcher_update_10103().
Changed
- The logs directory is read from the Monolog file handler in
monolog.channel_handlers, with thedefaultchannel checked first, instead of defaulting tologs.- The Logs directory setting is now optional. A value entered there still overrides detection.
logsis used only when no file handler writes underprivate://.- New installs leave the setting empty. Sites updating keep their stored value.
- The settings form shows the detected directory.
- The status report no longer says Monolog creates the directory on its first write.
- Status report entries use core's
RequirementSeverityenum on Drupal 11.2 and later, instead of theREQUIREMENT_*constants that Drupal 12 removes. Drupal 10.3 to 11.1 get the same values as before. - Tests use PHPUnit attributes, including
#[Group], for Drupal 12 test discovery. - phpstan no longer needs Drush installed.
Documentation
- The README explains how the logs directory is detected and when it is created.
- The install command is now
composer require 'drupal/monolog_watcher:^1.4@beta'. - The README adds a troubleshooting entry for the "append mode" error.
Upgrading from 1.4.0-beta1
- Run
composer update drupal/monolog_watcher, thendrush updb. - To have a site follow its Monolog handler, clear the Logs directory setting.
- On a fresh site where
monologandmonolog_watcherare enabled in one command, create the logs directory first. Anything logged beforemonolog_watcherfinishes installing can still fail.