Configurable

WatchdogExceptionRector

Fixes deprecated watchdog_exception('update', $exception) calls

-watchdog_exception('update', $exception);
+use \Drupal\Core\Utility\Error;
+$logger = \Drupal::logger('update');
+Error::logException($logger, $exception);

Configure your rector.php:

<?php

use DrupalRector\Drupal10\Rector\Deprecation\WatchdogExceptionRector;
use DrupalRector\Rector\ValueObject\DrupalIntroducedVersionConfiguration;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withConfiguredRule(WatchdogExceptionRector::class, [
        new DrupalIntroducedVersionConfiguration('10.1.0'),
    ]);