Problem/Motivation
logger.dblog
is backend overrideable but it's pointless to override it because the module is littered with database queries.
Proposed resolution
- Create a storage backend for the dblog module.
- Create a new LogEntry class to avoid the need of interact directly with database records.
- Put all the queries of the dblog.module in this storage.
- Make this storage backend available as a service.
- Refactor the dblog module to interact with this new service
- Delete the use of
$SESSION
from the controller. This feature is covered by: #2015149: Replace dblog recent log entries with a view
Remaining tasks
- Update this patch removing the views integration changes already introduced here: #2851293: dblog is using the wrong views field, filter and relationships definitionsDone
- Refactor
DbLogController::buildFilterQuery()
to return a[field, [values, ...], operator]
array. That the storage backend can use to build the filter. - Add test coverage for the refactor of
buildFilterQuery
- Refactor
DbLogStorage::loadMultiple
to use the new filter notation described above. - Add unit tests for the LogEntry class
User interface changes
None.
API changes
- A new
DbLogStorage
service (storage.dblog). - A new
LogEntry
class. _dblog_get_message_types
deprecated. CR: https://www.drupal.org/node/2857426