Drupal 7 contained many rules_log() calls from the rules plugins / rules expression classes, which were responsible for keeping the rules debug log and showing it in case of evaluation errors.

In Drupal 8, we want to do so similar but use a logger service instead of the function. As a first step, we can convert the existing RulesLog class to a service and add a test case for it.

So:
- Let's implement https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logg...
- Let's inject the core logger service, so we can forward messages above a configurable severity to the core logger
- Let's name the service rules.log

Comments

fago’s picture

Issue summary: View changes
Issue tags: +SprintWeekend2015

ok, discussed it with klausi a bit more:

- Let's implement https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logg...
- Let's inject the core logger service, so we can forward messages above a configurable severity to the core logger
- Let's name the service rules.log

lussoluca’s picture

Status: Active » Needs work

I do a pull request here:

https://github.com/fago/rules/pull/122

a.milkovsky’s picture

We should use future settings from https://www.drupal.org/node/2471693 here

a.milkovsky’s picture

m1r1k’s picture

Assigned: Unassigned » m1r1k
Issue tags: +drupaldevdays
m1r1k’s picture

Lets separate Logging and Debugging:

Logging - separate LoggerChannel

Debuggin - integration for webprofiler module

fubhy’s picture

The Logging Rewrite is done (https://github.com/fago/rules/pull/170) and was just merged. Next up: Integrating with web profiler (https://github.com/fago/rules/pull/175) - This one still needs some functional tests.

  • fubhy committed 2a71c99 on 8.x-3.x
    Merge pull request #170 from M1r1k/rules-logger
    
    Issue #2404089 by M1r1k...
dasjo’s picture

Assigned: m1r1k » Unassigned

I'm unassigning this for now, feel free to pick it up whenever you have time to work on it.
Cheers, dasjo

fago’s picture

Status: Needs work » Fixed

This has been fixed, adding tests can be a follow-up.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.