rust-cli / rust-cli/env_logger

Format builder's state as RUST_LOG-like value

Open
#257 0 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

For logging purposes, I would like to print the RUST_LOG and possibly RUST_LOG_STYLE values as ingested by the env_logger. Is there a way to serialize internal state of the env_logger::Builder as a RUST_LOG-like string?

I could of course just read the RUST_LOG env var, and do a default fallback, but it seems this won't be as clean as having the builder format its own state?

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 by inspecting env_logger::Builder and the parsing of RUST_LOG and RUST_LOG_STYLE. Determine whether the internal builder state can have a stable RUST_LOG-like representation, and consider the issue complete only when the proposed serialization behavior and its API are defined and tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.