Page MenuHomePhabricator

WikiLambda PHP: Document our logging conventions
Open, LowPublic

Description

We have a handful of uses of wfDebug() in WikiLambda PHP. A patch review has said: "suggest using a specific logger instead of just general wfDebug, so that this gets labeled with a WikiLambda channel". (See patch.) I'm not aware of any conventions for this. If there are none, let's decide on a logging channel and other details of our logging approach and document it somewhere.

Desired behavior/Acceptance criteria


Completion checklist

Event Timeline

Change 893525 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] ApiPerformTest: Transition wfDebug() calls to proper logs where we can

https://gerrit.wikimedia.org/r/893525

Change 893525 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] ApiPerformTest: Transition wfDebug() calls to proper logs where we can

https://gerrit.wikimedia.org/r/893525

Change 901686 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] ApiPerformTest: Move logging up to WikiLambdaApibase and implement generally

https://gerrit.wikimedia.org/r/901686

Change 901686 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] ApiPerformTest: Move logging up to WikiLambdaApibase and implement generally

https://gerrit.wikimedia.org/r/901686

I think this ticket is closable. Since this ticket was written, we have new code in WikiLambdaApiBase.php that creates a logger on channel WikiLambda, and use of the logger is illustrated in ApiPerformTest.php. Even though I suggested documenting our conventions, I now feel like what we have is sufficiently straightforward and self-documenting. @Jdforrester-WMF - I'll leave it open for now, in case you have identified any other actions to be done before closing.

I think this ticket is closable. Since this ticket was written, we have new code in WikiLambdaApiBase.php that creates a logger on channel WikiLambda, and use of the logger is illustrated in ApiPerformTest.php. Even though I suggested documenting our conventions, I now feel like what we have is sufficiently straightforward and self-documenting. @Jdforrester-WMF - I'll leave it open for now, in case you have identified any other actions to be done before closing.

Yeah, I think we just need to fix the documentation to consider this Resolved.

Jdforrester-WMF renamed this task from WikiLambda PHP: Establish logging conventions to WikiLambda PHP: Document our logging conventions.Jun 8 2023, 9:40 PM
Jdforrester-WMF lowered the priority of this task from Medium to Low.
Jdforrester-WMF added a subscriber: CCoxwell-WMF.