Improve logging when a contribution is created/updated #19252
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
When a contribution is created in CiviCRM up to 3 log messages are created. Compared with other actions in CiviCRM this is very verbose (ie. most things don't log anything by default). The messages that are logged are not very useful because they don't give enough information to use them for forensics/debugging:
This PR removes the 3rd one entirely and updates the first two messages to include the contribution ID making them far more useful:
Before
After
Technical Details
Explained above.
Comments
These have annoyed me for a while as they are are often found in the logs but are not very helpful...