From f6923af8ab68ec6cb85976aedf3ef98f2ebf8a90 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Sun, 14 Jun 2020 10:37:08 -0500 Subject: [PATCH] Added source logging to cron upload output when all sources are enabled --- ext/cron_uploader/main.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/cron_uploader/main.php b/ext/cron_uploader/main.php index b5dade95..40f67930 100644 --- a/ext/cron_uploader/main.php +++ b/ext/cron_uploader/main.php @@ -119,11 +119,12 @@ class CronUploader extends Extension public function onLog(LogEvent $event) { global $config; + $all = $config->get_bool(CronUploaderConfig::INCLUDE_ALL_LOGS); if (self::$IMPORT_RUNNING && $event->priority >= $config->get_int(CronUploaderConfig::LOG_LEVEL) && - ($event->section==self::NAME || $config->get_bool(CronUploaderConfig::INCLUDE_ALL_LOGS)) + ($event->section==self::NAME || $all) ) { - $output = "[" . date('Y-m-d H:i:s') . "] [" . LOGGING_LEVEL_NAMES[$event->priority] . "] " . $event->message ; + $output = "[" . date('Y-m-d H:i:s') . "] " . ($all ? '['. $event->section .'] ' :'') . "[" . LOGGING_LEVEL_NAMES[$event->priority] . "] " . $event->message ; echo $output . "\r\n"; flush_output();