rust-cli / rust-cli/env_logger
Logging levels to different outputs
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.1k
- Forks
- 149
- Avg merge
- 2h 42m
- Merged PRs (30d)
- 4
Description
I think it'd be a useful addition to allow logging different logging levels to different outputs. If this is already possible, please excuse my inability to search issues or read documentation or read code. Especially the last.
Self deprication aside, it's currently hardcoded what targets can be used with env_logger. The current issue I'm facing is the following:
- I log info logs
- I log error logs
- Both go to stderr, stdout or a pipe I guess
I don't like that, I'd prefer logging info to stdout and error to stderr. That should be relatively simple with a Mixed target or smtg, and implementing the different targets seperately instead of matching an enum. That'd even open up the possibility for custom targets!
Do I dream too big? Yes. But!
Okay, yes.
Thanks, hope this sparks some ideas, I'm sorry for being so casual k thx bye <3
(also, letting me implement it is a bad idea I cannot do the rust well)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading env_logger's current hardcoded target handling and the discussion around issue #364. Determine how a Mixed target, per-level routing, and custom targets would fit the existing target and enum design. Done means the behavior and API are agreed on and routing such as info to stdout and error to stderr is implemented 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
- 25/100