Improve console debug message styling and formatting

Created on 22 June 2025, about 2 months ago

Problem/Motivation

The current console debug messages are alright but could be improved with colours, emoji, etc. to make visually scanning the console easier. Workbox's logging is a good example of the direction I'd like to take.

Steps to reproduce

Have debug module enabled, visit a bunch of pages. Look at console log.

Proposed resolution

Workbox's infra/utils/log-helper.js is fairly simple, and uses Chalk under the hood, a fairly popular terminal styling library.

Remaining tasks

Chalk 5.x only has an ESM release, so to allow it to be aggregated and minified by Drupal, we'll need to compile to UMD using a tool such as Rollup.

User interface changes

Only in the dev tools console.

API changes

None.

Data model changes

None.

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada ambient.impact Toronto

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

Comments & Activities

Production build 0.71.5 2024