rust-cli / rust-cli/env_logger

How to change colors without reimplementing formatting?

Open
#379 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.1k
Forks
149
Avg merge
2h 42m
Merged PRs (30d)
4

Description

The current choice of colors is not ideal, because the blue color for debug messages is pretty much unreadable when using the default ANSI colors on dark background.

However, I could not find any examples on how to change just the colors, and looking at ConfigurableFormatWriter it feels like a LOT of code would need to be duplicated to change the colors in an application.

A good alternative to making colors customizable could be to simply use a color for debug that looks OK on both dark and light backgrounds...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the color selection in src/fmt/mod.rs around the linked debug-color code, then read ConfigurableFormatWriter to understand the formatting surface involved. Done means the issue's requested color customization or a documented alternative is clearly defined and supported without requiring applications to duplicate the formatter.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
observability-sre
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.