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

Created on 20 February 2024, 4 months ago
Updated 8 April 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);
    }

This change requires Drupal 10.1

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Postponed

Version

6.2

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