Placeholders should be used in logger messages

Created on 13 August 2021, over 3 years ago
Updated 13 February 2025, about 2 months ago

Problem/Motivation

Log messages which do not use placeholder cause the locales_source table to grow in size every time a message is logged.

modules/varnish_focal_point_purge/varnish_focal_point_purge.module:91:            $logger->error("URL not purged $url {$message}");
modules/varnish_image_purge/varnish_image_purge.module:144:                $logger->error("URL not purged $url {$message}");

There may be more. You might want to run Drupal coder to find out more.

Steps to reproduce

cause some url to not get purged and check locales_* tables.

Proposed resolution

https://drupalize.me/blog/201510/how-log-messages-drupal-8 (from 2015 but still very much accurate)

Remaining tasks

patch

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

🇨🇦Canada scor Toronto

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024