Commit graph

5 commits

Author SHA1 Message Date
Timo Tijhof
e7939ffcd4 Add missing namespace to @covers comment in LegacyLoggerTest
> Trying to @cover or @use not existing method "LegacyLogger::interpolate"

Makes code coverage run fail at the moment.

Change-Id: I8417b5c2f1fc116583758c7507770c796127bb67
2016-02-23 03:18:31 +00:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Timo Tijhof
5d2f9d08ee logger: Fix undefined variable $data
Follows-up 77a397125f. Also add unit test that would've caught
this "PHP Notice: Undefined variable: data" error.

Change-Id: I8a3bd9c8b685c2aa7a466e3d3c61ffa027be02fa
2015-07-29 18:26:52 -07:00
Bryan Davis
77a397125f Convert MWExceptionHandler to use structured logging
Replace wfDebugLog() calls in MWExceptionHandler with direct use of
LoggerFactory and LoggerInterface. Logged exceptions are added to the
log message context.

LegacyLogger is also updated to append stack traces to any log event
when $wgLogExceptionBacktrace is true and the PSR-3 recommendation of
passing the exception as an 'exception' context item.

Handling of context data in LegacyLogger is expanded to support arrays,
exceptions and common object types.

Bug: T88649
Change-Id: I71499d895582bdea033a2516c902e23e38084080
2015-07-15 21:03:46 -05:00
Bryan Davis
3a577ce8f0 MonologSpi: Add method to provide additional configuration
Allow post-initialization configuration of MonologSpi by providing
a `mergeConfig()` method that can be used to merge a given collection of
configuration data with the existing configuration.

Bug: T104584
Change-Id: Iba6f115a79dbc0060f64a9095467d147cf53b8ae
2015-07-10 09:43:07 -06:00
Renamed from tests/phpunit/includes/debug/logging/LegacyLoggerTest.php (Browse further)