Watchdog logging using 'mailer' instead of 'symfony_mailer'

Created on 27 June 2024, 3 days ago

Problem/Motivation

Watchdog logs for a site show symfony_mailer messages as coming from "mailer", which may make troubleshooting confusing.

Steps to reproduce

Look at watchdog entries :)

Also: code has this:

src/Mailer.php
280:      $this->loggerFactory->get('mailer')->error('Error sending email: %message', $params);

Proposed resolution

Replace 'mailer' with 'symfony_mailer'

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs review

Version

1.4

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States janusman

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

Merge Requests

Comments & Activities

  • Issue created by @janusman
  • πŸ‡¬πŸ‡§United Kingdom aaron.ferris

    aaron.ferris β†’ made their first commit to this issue’s fork.

  • Status changed to Needs review 3 days ago
  • πŸ‡¬πŸ‡§United Kingdom aaron.ferris

    Makes sense to me, I can see we are logging entries as 'swift_mailer' elsewhere also. Raised an MR.

      /**
       * {@inheritdoc}
       */
      public function submitForm(array &$form, FormStateInterface $form_state) {
        $this->overrideManager->action($this->id, $this->action);
        $message = ($this->id == OverrideManagerInterface::ALL_OVERRIDES) ?
          $this->t('Completed %action for all overrides', $this->args) :
          $this->t('Completed %action for override %name', $this->args);
        $this->messenger()->addStatus($message);
        $this->logger('symfony_mailer')->notice($message);
        $form_state->setRedirectUrl($this->getCancelUrl());
      }
  • Pipeline finished with Success
    3 days ago
    Total: 187s
    #209910
Production build 0.69.0 2024