[Drupal 11] watchdog_exception() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0

Created on 20 February 2024, 7 months ago
Updated 27 May 2024, 3 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 change requires Drupal 10.1, so it can't be merged into older branches.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

7.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