aries-cloudagent-python icon indicating copy to clipboard operation
aries-cloudagent-python copied to clipboard

:loud_sound: Improve logging for BaseRecord and Storage operations

Open ff137 opened this issue 8 months ago • 1 comments

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.

ff137 avatar Apr 29 '25 12:04 ff137

Quality Gate Failed Quality Gate failed

Failed conditions
78.0% Coverage on New Code (required ≥ 80%)
12.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

sonarqubecloud[bot] avatar May 13 '25 16:05 sonarqubecloud[bot]