Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294415

Add Monolog Symfony-Bridge to Drupal

$
0
0

Problem/Motivation

We have an opportunity in Drupal 8 to much improve our logging system.

Proposed resolution

Monolog is an abstracted logging service which integrates with many different handlers. In this forked issue from #1289536: Switch Watchdog to a PSR-3 logging framework, we will simply add Monolog to Drupal 8's code base.

Remaining tasks

See #1289536: Switch Watchdog to a PSR-3 logging framework

User interface changes

None.

API changes

Monolog's code is added to Drupal 8. See #1289536: Switch Watchdog to a PSR-3 logging framework for more information.

Original report by catch

hook_watchdog() is a good candidate for moving out of the hook system into pluggable (and in this case stackable) classes - we want it to be available as early as possible, however currently it's not available until bootstrap modules are loaded - too late if you want to log in a cache backend or the lock system for any reason.

However hook_watchdog() is a small part of what our existing logging modules do. dblog has settings for expiring log items and an admin page for viewing/filtering log entries. Syslog has an admin screen, mongodb in contrib has an improved version of the dblog UI. So those would likely stay more or less the same - just the actual logging backend called from watchdog() would be different.

If we moved logging to OOP, I'd want to keep the same basic feature of being able to have more than one logger enabled at a time - it's handy to be able to log different messages to different storage etc.

In #1263478: Identify pieces of Drupal that could be replaced by Symfony codehttps://github.com/Seldaek/monolog was brought up.

I had a very quick glance at the Monolog code mainly to see if it supports more than one handler (which it does). That would be a showstopper if not, have not looked beyond this though yet.


Viewing all articles
Browse latest Browse all 294415

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>