typelevel / typelevel/log4cats
Way to change loglevel locally / globally?
Open
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 416
- Forks
- 77
- Avg merge
- 6h 25m
- Merged PRs (30d)
- 3
Description
It may be useful if we can change loglevel in scope like: logger.withLoglevel("DEBUG"). Defining it as IO[Resource[IO, Unit]] enables us to change and revert loglevel simply.
Currently I'm calling System.setProperty("org.slf4j.simpleLogger.log.FooClass","DEBUG").
Thanks.
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 reviewing the proposed logger.withLoglevel("DEBUG") API and the current System.setProperty workaround described in the issue. Define what scoped and global changes should mean, how IO[Resource[IO, Unit]] should restore the previous level, and what tests would demonstrate both behaviors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100