:loud_sound: Improve logging for BaseRecord and Storage operations
Relates to trying to resolve webhooks being emitted before being written to the DB:
- https://github.com/openwallet-foundation/acapy/issues/3659
These logging changes are done as a separate improvement, and a precursor to refactoring the event bus (#3690)
I'm taking the approach that all CRUD actions should be logged, at least at debug level. And if something raises an exception, there should be a log right before it. Some of the exceptions should just log info (duplicate record, or not found), and others should log warnings. Error logs are reserved for when something goes wrong. So that's what I tried to adhere to.
🚧 I'll run a test suite with these changes, and see if the logging is reasonable or not.
Quality Gate failed
Failed conditions
78.0% Coverage on New Code (required ≥ 80%)
12.3% Duplication on New Code (required ≤ 3%)