charmbracelet / charmbracelet/log
different log level per package
- Dominant language
- Go
- Stars
- 3.4k
- Forks
- 103
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
Currently I parse the log level from `GO_LOG` so users can specify it from environment variable eg as `GO_LOG=DEBUG go run`
But I want to specify log level per package as we can do with Rust log:
**Describe the solution you'd like**
Option to set log level for specific modules/packages
```console
RUST_LOG=package_name=DEBUG,other_package=INFO` cargo run # Log level per package
RUST_LOG=DEBUG` cargo run # Global log level
```
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
I don't know if currently it's even possible to change other loggers
Contributor guide
Research direction
Start by reading the existing GO_LOG parsing and logging entry points to understand how a global level is applied. Define how package-specific levels should coexist with the global setting, using the RUST_LOG examples as the behavioral reference. Done should include documented package-level and global configuration behavior, with tests covering both.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100