Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve logging when a contribution is created/updated #19252

Merged
merged 1 commit into from
Dec 21, 2020

Conversation

mattwire
Copy link
Contributor

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:

1. Contribution record updated successfully
2. Receipt sent
3. Success: Database updated

This PR removes the 3rd one entirely and updates the first two messages to include the contribution ID making them far more useful:

Contribution {$contributionParams['id']} updated successfully
Contribution {$contributionParams['id']} Receipt sent

Before

1. Contribution record updated successfully
2. Receipt sent
3. Success: Database updated

After

Contribution {$contributionParams['id']} updated successfully
Contribution {$contributionParams['id']} Receipt sent

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...

@civibot
Copy link

civibot bot commented Dec 21, 2020

(Standard links)

@civibot civibot bot added the master label Dec 21, 2020
@seamuslee001
Copy link
Contributor

This looks good to me makes sense to me merging

@seamuslee001 seamuslee001 merged commit 21daa71 into civicrm:master Dec 21, 2020
@mattwire mattwire deleted the contributionupdatedlogs branch March 4, 2021 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants