logger: Produce traces for all Throwables
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 23 May 2019 14:19:06 +0000 (10:19 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 23 May 2019 14:39:39 +0000 (10:39 -0400)
commit82d525ad782ffb6890864e8ed8ec4764428f9522
treeca4fae68460de13cdd1c5cc99bebbf1aa71da44d
parente5eb5ac92815340f389048291d71ad9ddb75e690
logger: Produce traces for all Throwables

The code was checking for `Exception` to decide whether to produce traces,
so it wasn't providing them for PHP 7's new Errors. The code itself
works fine with any Throwable.

We have to keep parallel checks for Exception too for the time being,
because HHVM as used in Wikimedia production doesn't have Throwable.

Bug: T187147
Change-Id: Iec8a6718beb7ec09e45e332ee5762d0644ce17ab
includes/debug/logger/LegacyLogger.php
includes/debug/logger/monolog/LineFormatter.php
tests/phpunit/includes/debug/logger/LegacyLoggerTest.php
tests/phpunit/includes/debug/logger/monolog/LineFormatterTest.php