Business Rules logger entity sub-module

Created on 16 August 2019, over 5 years ago
Updated 19 August 2024, 4 months ago

Ready to be ported

Important NOTE:

Some rules may look like they failed but this is expected behaviour. If you have 2 rules on entity insert on different bundles they will both be triggered when you insert a node but only the right bundle will have success.

Problem/Motivation

Often I'm forced to add all these watchdog loggers to be able to check if a rule or an action has been fired.
Many of the rules and action are fired on CRON runs or triggered on REST requests and routes.

Proposed resolution

Have a sub-module with an custom entity much similar to watchdog and trasfer the data from business_rules to this and display it with dbug styling when visited.

Remaining tasks

User interface changes

Logs are located at: /admin/reports/br_log

Enable the logging in /admin/config/workflow/business_rules/settings

Issues

Fixed:

Please read the README.txt for more details located in br_logs sub-module.

API
---
          // Information to be stored with the log.
          $fields = [
            'description' => $rule_data['#description'],
            'items' => $rule_items,
            'rule_status' => $rule_status,
            'variables' => $variables,
          ];

          // Call br_logs service
          \Drupal::service('br_logs')
            ->rulesLogger($type = $rule_id, $rule_data['#title'], $rule_data, $fields);
✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom lexsoft00

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024