Problem/Motivation
Now the module creates custom log entries that are stored in a separate database table - it works well, but makes the logs a separate thing, detached from all other Drupal logs, and you have to store, manage, view, and clean up them separately.
This was done because the default Drupal logger was not extendable and didn't support storing custom fields and metadata. But the Logger module fixes this!
Using it, you can use the same standard PSR-3 Logger Interface to accept logs, but keep all the metadata, attached in the context, together with the log entry.
Having this, now you are able to store any fields just using a standard Drupal Logger service, and build reports with custom fields and filters by custom values directly in the Drupal admin panel using Views.
See these modules as an example of how to make this:
Proposed resolution
The proposal is to add an option to use the default Drupal Logger and pass all custom metadata to it using the $context array. This will introduce no new hard dependencies, but by recommending the soft dependency on the Logger DB module, will provide the ability to view and manage the Object Log entries together with other log entries.
Comments