Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2019-04-01 02:53:19 +0300
committerGitHub <noreply@github.com>2019-04-01 02:53:19 +0300
commitf2d44ef65a075f2b42f066092c4abef8e94dcc90 (patch)
treedffd9c2baa70a1ed4db233b705944d64d8bfa83b /plugins/Monolog/config
parent79b526dc47f8c776577276f93b8ffb93b5973e76 (diff)
Fixing build (#14296)
* fix condition * NullHandler must be end of writer array to allow other handlers to handle the message (since it seems to stop bubbling). * Do not do php eol check during tests. * Just in case. * try to fix the build * Add screenshot.
Diffstat (limited to 'plugins/Monolog/config')
-rw-r--r--plugins/Monolog/config/config.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/Monolog/config/config.php b/plugins/Monolog/config/config.php
index 4d5e3d15a3..ff60f7c5bd 100644
--- a/plugins/Monolog/config/config.php
+++ b/plugins/Monolog/config/config.php
@@ -38,12 +38,7 @@ return array(
$writerNames = array_map('trim', $writerNames);
- $writers = [
- // we always add the null handler to make sure there is at least one handler specified. otherwise Monolog will
- // add a stream handler to stderr w/ a DEBUG log level, which will cause archiving requests to fail.
- $c->get(\Monolog\Handler\NullHandler::class),
- ];
-
+ $writers = [];
foreach ($writerNames as $writerName) {
if ($writerName === 'screen' && \Piwik\Common::isPhpCliMode()) {
continue; // screen writer is only valid for web requests
@@ -77,6 +72,12 @@ return array(
$writers[] = $c->get(LogCaptureHandler::class);
}
+ // we always add the null handler to make sure there is at least one handler specified. otherwise Monolog will
+ // add a stream handler to stderr w/ a DEBUG log level, which will cause archiving requests to fail.
+ if (empty($writers)) {
+ $writers[] = $c->get(\Monolog\Handler\NullHandler::class);
+ }
+
return array_values($writers);
}),