Log message about token refresh should not "notice" not "error"

Created on 9 March 2023, almost 2 years ago

Problem/Motivation

The current log that reports the Twitter API token being refreshed is of type "error." It should be a "notice" since it is not reporting an error but rather, information

Proposed resolution

diff --git a/src/Authorization.php b/src/Authorization.php
index ed0aaa4..ba7cc94 100644
--- a/src/Authorization.php
+++ b/src/Authorization.php
@@ -44,7 +44,7 @@ class Authorization {
       \Drupal::state()->set('twitter_api_access_token', $body['access_token']);
       // Invalidate the cache so that potentially broken widgets now display.
       Cache::invalidateTags(['twitter_profile_widget']);
-      \Drupal::logger('twitter_profile_widget')->error('Refreshed Twitter API token.');
+      \Drupal::logger('twitter_profile_widget')->notice('Refreshed Twitter API token.');
     }
     catch (RequestException $e) {
       if ($e->hasResponse()) {
πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

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

Comments & Activities

Production build 0.71.5 2024