Page MenuHomePhabricator

Convert MediaWiki logging to direct use of PSR-3
Open, LowPublic

Description

Convert wfDebug and wfDebugLog calls in MediaWiki core and extensions to the use PSR-3 Logger classes.

  • Map log events to appropriate severity levels
    • debug: Useful for ummm.... debugging. :) These are messages that are useful for local development and are generally too "spammy" to output on a production wiki. This would typically include anything currently being logged via wfDebug.
    • info: Valuable state change information. This level is a great place to record information that would be useful in a production environment when tracing the path of a request that eventually had an error. This is currently the level automatically associated with wfDebugLog calls when mapped to PSR-3.
    • warning: A soft error condition such as a recoverable error or another condition that typically should not be seen but isn't halting for the operation in process.
    • error: A hard error such as a caught exception with no recovery path.
  • Add structured data to logging context when available and appropriate.
    • __METHOD__
    • Attach exceptions to messages
    • Attach parameters or other interesting state to messages
    • Replace faux structure such as tab separated items, label=value/label:value pairs, or json serialization

Event Timeline

bd808 created this task.Feb 5 2015, 3:34 AM
bd808 raised the priority of this task from to Needs Triage.
bd808 updated the task description. (Show Details)
bd808 added a subscriber: bd808.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 5 2015, 3:34 AM
Qgil triaged this task as Low priority.Feb 5 2015, 9:45 PM
bd808 renamed this task from PSR-3 logging conversion to Convert MediaWiki logging to direct use of PSR-3.Feb 9 2015, 3:42 AM
bd808 added a project: Epic.
bd808 set Security to None.
bd808 moved this task from To Do to In Dev/Progress on the User-bd808 board.May 20 2015, 11:21 PM

Change 213348 had a related patch set uploaded (by BryanDavis):
Convert MWExceptionHandler to use structured logging

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

Qgil added a subscriber: Qgil.Jun 4 2015, 10:43 AM

We are trying to help all open tasks listed under "Work continues after Lyon" at the Wikimedia Hackathon 2015 workboard finding their best way forward. * If you are participating in Wikimania, consider adding the #Wikimania-Hackathon-2015 project to get this task in that loop, which is about to start. * If you think this project could welcome help from a dedicated Google Summer of Code or Outreachy intern, or from an Individual Engagement Grant, add the Possible-Tech-Projects project. * If you would like to receive some other type of support (organizing a Tech Talk, establishing contacts with existing developer teams in Wikimedia or elsewhere, travel sponsorship for a related activity... you name it), please create a subtask explaining your request and associate it with Developer-Advocacy (or you can start by commenting here if you prefer). * Keeping the description, priority and assigned fields up to date always helps. :) For some context about this message, see T101151: Evaluate which projects showcased at the Wikimedia Hackathon should be supported further. It is the last communication related to Wikimedia-Hackathon-2015 that we will post here.

Change 213348 merged by jenkins-bot:
Convert MWExceptionHandler to use structured logging

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

Change 227873 had a related patch set uploaded (by BryanDavis):
RedisConnectionPool: convert to PSR3 logging

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

Change 227873 merged by jenkins-bot:
RedisConnectionPool: convert to PSR3 logging

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

Legoktm renamed this task from Convert MediaWiki logging to direct use of PSR-3 to Convert MediaWiki logging to direct use of PSR-3 (tracking).Nov 2 2015, 4:50 AM
bd808 moved this task from In Dev/Progress to To Do on the User-bd808 board.Nov 13 2015, 6:35 PM
Qgil removed a subscriber: Qgil.Feb 15 2016, 9:52 AM
Danny_B renamed this task from Convert MediaWiki logging to direct use of PSR-3 (tracking) to Convert MediaWiki logging to direct use of PSR-3.Jul 16 2016, 3:12 AM
Danny_B removed a project: Tracking-Neverending.