API page: https://api.drupal.org/api/drupal/core%21modules%21dblog%21src%21Logger%...
public function log($level, $message, array $context = []) {
The DbLog class should explain that $message should not be a translated string, but that translation placeholders should be given in $context.
Comments
Comment #11
mohit_aghera commentedI came across this issue while doing bugsmash triage.
https://git.drupalcode.org/project/drupal/-/blob/main/core/modules/dblog...
The
$messageis already type casted to be string or \Stringable.I believe this isn't relevant anymore?
I also noticed one more thing.
Since TranslatableMarkup also implements MarkupInterface which eventually implements \Stringable, I think someone might end up passing TranslatableMarkup.
https://git.drupalcode.org/project/drupal/-/blob/main/core/lib/Drupal/Co...
Not sure entirely about that though.