Extend your Drupal Watchdog!
Extend your Drupal Watchdog!
Aleksei Korepov (Murz)
Do you still use Database Logging in Drupal? Or already switched to the syslog, files, cloud? In both cases - you're cooking the logs wrong! And I'll explain why!
Prerequisite
A couple of looks at Drupal logs and an attempt to find something useful there.
Outline
Do you still use Database Logging in Drupal? Or already switched to the syslog, files, cloud?
In both cases - you're cooking the logs wrong! And I'll explain why!
Start using the full power of logging to make the log entries really meaningful, structured, and parseable, with the ability to store any metadata together with the log record.
I'll teach you how to extend your Drupal Logger to include there additional information, that helps you to track operations performance, progress, and results, detailed errors, exceptions.
You will be able to quickly filter your logs by any deep value of your unstructured metadata object.
And even more: We will build colorful charts directly from your logs, without any separate metrics reporting to Prometheus!
And all this - directly on your localhost, without any commercial services and clouds.
Bonus for attentive listeners: integration of logs with OpenTelemetry Traces.
Learning Objectives
1. Learn to store additional metadata via the default Drupal Logger interface.
2. Perform extending log records from Core like a Node save event and records from contrib modules with not enough data.
3. Deploy a log visualization system on your localhost and build analytic charts directly from metadata values in the log records.
Experience level
Intermediate