diff --git a/core/CronArchive.php b/core/CronArchive.php index 9158983d7b2e5bae99cfcbc650baaee6d42f0976..f3c6fc8a1748488bc610d7a4ceee5cce4f2b6e14 100644 --- a/core/CronArchive.php +++ b/core/CronArchive.php @@ -695,7 +695,10 @@ class CronArchive $log = $config->log; $log['log_only_when_debug_parameter'] = 0; $log[\Piwik\Log::LOG_WRITERS_CONFIG_OPTION] = array("screen"); - Log::getInstance()->addLogWriter('screen'); + + if (!empty($_GET['forcelogtoscreen'])) { + Log::getInstance()->addLogWriter('screen'); + } // Make sure we log at least INFO (if logger is set to DEBUG then keep it) $logLevel = @$log[\Piwik\Log::LOG_LEVEL_CONFIG_OPTION]; diff --git a/tests/PHPUnit/Integration/ArchiveWebTest.php b/tests/PHPUnit/Integration/ArchiveWebTest.php index ba84534cb2bf31ab95f5d2ca5f8987856095bb8f..6598f11df8ae4396e382f7bfa3d82f33f179c366 100644 --- a/tests/PHPUnit/Integration/ArchiveWebTest.php +++ b/tests/PHPUnit/Integration/ArchiveWebTest.php @@ -36,7 +36,7 @@ class Test_Piwik_Integration_ArchiveWebTest extends IntegrationTestCase $urlTmp = Option::get('piwikUrl'); Option::set('piwikUrl', $host . 'tests/PHPUnit/proxy/index.php'); - $output = file_get_contents($host . 'tests/PHPUnit/proxy/archive.php?token_auth=' . $token); + $output = file_get_contents($host . 'tests/PHPUnit/proxy/archive.php?token_auth=' . $token . '&forcelogtoscreen=1'); if (!empty($urlTmp)) { Option::set('piwikUrl', $urlTmp);