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 18 May 2024, about 1 month 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);
    }

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Closed: duplicate

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