watchdog_exception() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0

Created on 20 February 2024, 10 months ago
Updated 15 March 2024, 9 months ago

Problem/Motivation

The procedural watchdog_exception() function has been deprecated in drupal 10.1.0 and is removed from drupal:11.0.0.
See: https://www.drupal.org/node/2932520

Proposed resolution

Use Error::logException instead

use \Drupal\Core\Utility\Error;

    catch (\Exception $e) {
      Error::logException($this->logger, $e);
    }

Note that this will require Drupal 10.1, so the changes can only be merged when ready to drop support for prior versions.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024