https://bugzilla.wikimedia.org/show_bug.cgi?id=52209
Web browser: ---
Bug ID: 52209
Summary: wmerrors should log fatals in a machine-readable
format
Product: Wikimedia
Version: wmf-deployment
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: General/Unknown
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Mobile Platform: ---
MediaWiki fatals occurring on the production cluster are formatted and logged
by 'wmerrors', a PHP extension which Tim wrote. The output format is simple and
clear, and it approximates the format of exceptions logged from within
MediaWiki code. It is well-suited for flat log files.
However, because the output format is not formally specified and does not
adhere to a common data encoding standard, it's a bit tricky to process
programmatically. It'd be nice to have some service in production that performs
some intelligent grouping of fatals and produces useful reports and alerts, and
to that end it'd be nice to have wmerrors output JSON instead.
This isn't a blocker because we can decode the current output format using a
few simple regular expressions. But encoding at the source would be more
reliable and be subject to fewer idiosyncrasies. (Example: wmerrors calls PHP's
Exception::getTraceAsString, which uses ellipses to indicate truncation; it'd
be better to use Exception::getTrace, scrub the 'args' item from each frame,
and encode the whole thing as a JSON array.)
Once Iacda90fb is merged, it will be possible to log JSON-encoded exceptions
from core, so parity between the two log formats (exception & fatal) can be
maintained.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l