Page MenuHomePhabricator

Review our logging output via monolog
Closed, ResolvedPublicSpike

Description

When we run tasks we output via

Civi::log()->errror() etc

The default output is https://github.com/Seldaek/monolog/blob/main/src/Monolog/Formatter/LineFormatter.php#L28 - ie including $context and $extra but we excluded those deliberately with .. a todo...

https://github.com/eileenmcnaughton/monolog/commit/96a1e2fb00f8c1a50e288791a3de52eb926d0493

However, we have had some frustration with lack of detail with our queue errors - specifically the fact that we are not outputting the exceptions we hit - which the standard formatter would as they are part of the $context array.

Perhaps if we did the todo thing it would help us find the balance?

Related

https://github.com/civicrm/civicrm-core/pull/28034
https://wikitech.wikimedia.org/wiki/Fundraising/Internal-facing/CiviCRM#CiviCRM_queue_processing
https://github.com/Seldaek/monolog
https://github.com/eileenmcnaughton/monolog

Event Timeline

Eileenmcnaughton updated the task description. (Show Details)
Eileenmcnaughton updated the task description. (Show Details)
AKanji-WMF subscribed.

Adding to Sprint +1 - somewhat adjacent to Coworker tasks

Dwisehaupt changed the subtype of this task from "Task" to "Spike".Nov 14 2023, 8:54 PM
Dwisehaupt subscribed.

Moving to a spike since the discussion is needed to figure out what the next steps will be. Timebox to be determined in the future.

We deployed the patch discussed - there is another issue open for considering stderr vs stdout

XenoRyet set Final Story Points to 2.