Comments

TR created an issue. See original summary.

tr’s picture

As outlined in the parent issue, we need a D8 replacement for the D7 watchdog() function, which was used to send messages to the core Drupal dblog. Or course, we know how to do this, with a simple logger channel.

We first have to finish at least part of #3101194: Rename logger.channel.rules to logger.channel.rules_debug, because the name logger.channel.rules is already in use ...

This issue is to:

  1. Define a new logger.channel.rules service, using the default logger channel implementation (not our own class).
  2. Ensure all places in the codebase and tests that were using the former logger.channel.rules are checked to determine if they are really intended to log to the the database - in which case they should continue to use the new logger.channel.rules - or were intended to use the Rules debug channel (in-memory logs) - in which case they should be switched to using the new logger.channel.rules_debug
  3. Go through the entire D7 codebase and find all the places where watchdog() was used. Make sure that all these uses (actions/conditions, enabling/disabling rules, etc.) are ported to D8 using the new logger.channel.rules.
tr’s picture

Status: Active » Needs review
StatusFileSize
new21.72 KB

1) and part of 2) was done by #3101194: Rename logger.channel.rules to logger.channel.rules_debug.

The patch here covers the rest. watchdog() seems to have been used only for important system things, like a rule was enabled/disabled, email was sent, an IP address was banned, things of that nature. Plus, watchdog() was used when debug logging of Rules execution was turned on - this debug case will be covered in #3101198: [meta] Implement conditional logging and on-screen rendering in RulesDebugLoggingChannel and not here.

tr’s picture

StatusFileSize
new24.13 KB

Fixing the fails ...

tr’s picture

StatusFileSize
new24.15 KB

Sign, and now without the coding standards problems ... It's getting late ...

  • TR committed cd4d1b7 on 8.x-3.x
    Issue #3101199 by TR: Create a new rules logger channel for logging...
tr’s picture

Status: Needs review » Fixed

Committed.

tr’s picture

Status: Fixed » Closed (fixed)

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