Commit graph

4 commits

Author SHA1 Message Date
Gergő Tisza
1c53f5902e psysh: Dump selected log channels
* Extend ConsoleLogger to support filtering by log level and
  forwarding to another logger.
* Extend ConsoleSpi to support filtering by channel/level and
  forwarding to another provider.
* Allow configuring which channels shell.php should log to STDERR
  and at what levels.
* Deprecate shell.php -d, use more meaningful parameter names.
* Change logging behavior so that logging to STDERR doesn't
  prevent normal logging, which seemed like confusing behavior
  (either we should always disable normal logging for shell.php
  or never, it shouldn't depend on whether we log to console).
  Keep old behavior for -d, just in case.

Change-Id: I5d29c95995bf83784c96dd40df9c96e22b9ec73e
2023-02-09 11:35:59 +00:00
Daimona Eaytoy
290ab29617 Declare dynamic properties
This is for classes with a single undeclared property - aside from
BlockManager: I3f51fd3579514b83b567dfe20926df2f0930dc85 removed the
declaration of $permissionManager without actually removing all uses.

Change-Id: Ic2a95f77071312041be6e0633ea9b5325e98de42
2019-09-14 15:21:26 +02:00
Daimona Eaytoy
b3e4a6f61f Add docblocks to a bunch of methods
Copied from I014ea7f048862cc8cc387a68bf0f1cc5acbd9c6e.

Change-Id: Ic3216386af173cfb9cbffda0826879829e52ffbb
2019-09-08 18:33:31 +00:00
Tim Starling
a59ed5f3de Add ConsoleLogger, use it for eval.php -d
eval.php previously set $wgDebugLogFile to /dev/stdout. This had the
following problems:

* It doesn't work if the maintenance script is executed via sudo, since
  /dev/stdout is typically owned by the original user, so MW can't open
  it. Using php://stdout worked on HHVM but not PHP.
* Setting $wgDebugLogFile has no effect if the wiki uses MonologSpi.
* Setting $wgDebugLogFile has no effect on channels configured with
  $wgDebugLogGroups.
* stderr is a more appropriate place to send logging output.
* Writing to configuration variables is discouraged.

So, add ConsoleSpi, which is a very simple logging service provider
which sends all messages to stderr. This should be suitable for
debugging with eval.php or shell.php in WMF production or beta.

Change-Id: Ib0d6ce45e0cbecd58263fc4e360c63d4149acb3a
2017-04-28 10:05:05 +10:00