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

Provide a storage backend for dblog module

$
0
0

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

  1. A new DbLogStorage service (storage.dblog).
  2. A new LogEntry class.
  3. _dblog_get_message_types deprecated. CR: https://www.drupal.org/node/2857426

Viewing all articles
Browse latest Browse all 300474

Trending Articles



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