Problem/Motivation

The $message parameter passed to the LoggerInterface methods must be a literal string that uses placeholders. It's not a translatable string returned from t()/$this->t(), a string concatenation, a value returned from a function/method, nor a variable containing an exception object.

$this->logger->error($this->t('Error in the request: @message', ['@message' => $e->getMessage()]));
$this->logger->error($this->t('The JSON could not be obtained from the service provided.'));
$this->logger->error($this->t('The JSON could not be obtained from the service provided.'));

Proposed resolution

Review and update the module code.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

juandels3 created an issue. See original summary.

juandels3’s picture

Assigned: Unassigned » juandels3

juandels3’s picture

Status: Active » Needs review
juandels3’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • juandels3 committed b082aef8 on 1.0.x
    refactor: #3571695 Remove transliteration from LoggerInterface methods

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.