In T228462, we had some errors in a DeferredUpdate which is caught by DeferredUpdates::run() and logged to the DeferredUpdates channel. But the errors/exception was not showing up until @tstarling configured the logging channel in mediawiki-config:
$wmgMonologChannels['default']['DeferredUpdates'] = 'error';
If I understand it properly, that implies our log configuration must explicitly list each of the log buckets. I would have assumed we have a catch all for anything that is at error or above. Instead the channels not referenced fall back to $wmgDefaultMonologHandler which is set to blackhole logs:
// Statically configured Monolog handler to clone for log channels that are // not specifically configured in $wmgMonologChannels. // See $wmgMonologConfig['handlers'] in logging.php for valid values. 'wmgDefaultMonologHandler' => [ 'default' => 'blackhole', 'testwiki' => 'wgDebugLogFile', 'test2wiki' => 'wgDebugLogFile', ],
$wmgMonologConfig = [ 'loggers' => [ // Template for all undefined log channels '@default' => [ 'handlers' => (array)$wmgDefaultMonologHandler, 'processors' => array_keys( $wmgMonologProcessors ), 'calls' => $wmgMonologLoggerCalls, ], ],
So unless a log channel is explicitly referenced, we are missing errors :-\ I guess that instead of using a black hole, we should at least log at error level, if not at warning level. Maybe with an extra context field to differentiate those fallback logs.