openwallet-foundation / acapy

ACA-Py is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://aca-py.org
Apache License 2.0
419 stars 512 forks source link

:art: Refactor the logging module monolith #3319

Closed ff137 closed 3 weeks ago

ff137 commented 3 weeks ago

The existing acapy_agent/config/logging.py module is a monolith, containing multiple logging-related functionalities.

This PR breaks down the module into smaller, more focused components under config/logging/ to improve maintainability and testability. No functional changes are introduced; this is purely a structural reorganization. Everything in the previous logging.py module has been copied directly and split up into bespoke modules.

(Note: This is a pre-cursor PR to introducing loguru as an optional log provider. So, this is some initial refactoring to help streamline that contribution.) (edit: maybe no need for loguru, but the refactoring helps for general maintainability)

ff137 commented 3 weeks ago

5 "security hotspots" identified by sonarcloud -- they seem to be safe to ignore test coverage is perhaps worth increasing. not what I had in mind :-) but maybe not too hard to generate some unit tests

sonarcloud[bot] commented 3 weeks ago

Quality Gate Failed Quality Gate failed

Failed conditions
5 Security Hotspots
63.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

jamshale commented 3 weeks ago

This is ready? Looking good to me 👍

ff137 commented 3 weeks ago

@jamshale I'm happy with it! Tested it and everything looks the same 👍