esphome / esphome/feature-requests
Make Colorful Logs Configurable
- Dominant language
- No language data
- Stars
- 450
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem you have/What new integration you would like**
By default the logger component adds color to the text depending on log level. As this happens at the very first stages of processing, the color information is spread everywhere, also into the MQTT messages and thus into system logfiles.
While I understand that it is helpful to have colorful messages e.g. in the online log, these control characters might sometimes be counter productive.
I think it would be nice, if colored output could be added as an optional boolean configuration variable, defaulting to true, keeping the known behavior but making it possible to turn it off entirely.
**Please describe your use case for this integration and alternatives you've tried:**
Removing the color string from Logger::write_header_
**Additional context**
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate Logger::write_header_ in the logger component and trace where its output enters MQTT messages and system logfiles. Check the existing configuration path; done means a boolean setting defaults to the current colored behavior and can disable color control characters throughout those outputs.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100