Page MenuHomePhabricator

De-duplicate %context% in Civi log lines
Open, Needs TriagePublic

Description

Since we added more info to log lines in https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/crm/+/992276 there's a lot of duplication.

For example:

civicrm.wmf.INFO: thank_you: Attempting to send 1 thank you mails for contributions from the last 14 days. {"number_of_days":14,"message_limit":1} 
civicrm.wmf.INFO: thank_you: Attempting to send thank you mail for contribution ID [115], trxn_id [ADYEN BJQQQSL8NVTFWR82], contact_id [208] {"contribution_id":"115","trxn_id":"ADYEN BJQQQSL8NVTFWR82","contact_id":"208"} 
civicrm.wmf.INFO: thank_you: Sending ty email to: jwales@example.com {"to_address":"jwales@example.com"} 
civicrm.wmf.INFO: thank_you: Thank you mail sent successfully to contact_id 208 for contribution id: 115 to jwales@example.com {"contact_id":"208","contribution_id":"115","recipient_address":"jwales@example.com"} 
civicrm.wmf.INFO: thank_you: Updating TY send date to: 2024-02-08 22:50:31 {"date":"2024-02-08 22:50:31"} 
civicrm.wmf.INFO: thank_you: Sent 1 thank you emails. {"total_thank_you_emails":1}

Let's see if we can just add the exception to the message and stop duplicating the %context% when it's all stuff that's been interpolated into the message

See T350649. Note that the TODO regarding using SyslogFormatter will require us to update to at least PHP 8.1 (and update php-queue to work with monolog 3)

Related Objects