getsentry / getsentry/sentry

JavaScript: Process console.log() styles

Open
#49,804 3 comments 4 reactions 0 assignees View on GitHub
Feature javascript Waiting for: Product Owner
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
1d 5h
Merged PRs (30d)
624

Description

### Problem Statement

It can be difficult to follow the console log on JavaScript projects when using [console log styling](https://developer.chrome.com/docs/devtools/console/format-style/#style-console-messages).

### Example of styled console messages in Chrome
Screenshot 2023-05-25 at 12 10 52

### The same styled console messages in Sentry
Screenshot 2023-05-25 at 12 11 44

### Solution Brainstorm

Ideally the styles would be applied with the same rules as browsers (where only the first parameter can contain `%c` style references).

Though not quite as nice, stripping the `%c` vars and the following format parameters (there will be one for each `%c`) would at least make it more readable.

### Product Area

Issues

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.