rust-cli / rust-cli/env_logger

Builder get current log level

Open
#331 1 comment 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

I would like to set the log level of a specific module depending on the global loglevel, specifically -1 - i.e. if the global loglevel (as set by the environment variable RUST_LOG) is Debug, the level should be Info.
If no level is set via environment variable, it should default to only Errors.

I think this could be added to the builder to request already set directives, so that I don't have to go about parsing the environment variables again.

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 reading the builder API and the RUST_LOG environment-variable directive parsing. Define how callers request the effective directive or log level, including the no-variable default and the requested -1 adjustment, then add coverage for those cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.