ImperialCollegeLondon / ImperialCollegeLondon/virtual_ecosystem
Use logger error codes better
- Dominant language
- Python
- Stars
- 20
- Forks
- 5
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 34
Description
**Describe the bug**
At the moment, we are using the INFO, ERROR and CRITICAL codes from `logger` but we need to be clearer about the audience for different messages and target them better.
The key one here at the moment is that we are using INFO for all sorts of internal setup things (like the various function registries). Those are not messages that a normal user will want to see - they make much more sense as DEBUG messages - and we can add a `debug` or `log_level` item to the config (defaulting to INFO) that allows them to be exposed. Developers can of course programatically change the logging level.
We also have WARNING - which I don't think is used yet. This should also be for user focussed messages. We _can_ create custom levels, but I don't see any need at present.
Contributor guide
Research direction
Start by locating the logger setup, configuration handling, and internal function-registry messages described in the issue. Review how INFO, ERROR, CRITICAL, and WARNING are currently used; done means internal setup is DEBUG-level, user-facing messages use appropriate levels, and the configurable level defaults to INFO.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100