Add timestamps to ImportCLICommand
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 15 Mar 2021 14:05:35 +0000 (15:05 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 15 Mar 2021 14:05:35 +0000 (15:05 +0100)
wcfsetup/install/files/lib/system/cli/command/ImportCLICommand.class.php

index 990db4d7756226179da5bc0af924ae289cad0fe8..249d6a2046c7992c73998463ff18f717415e22fd 100644 (file)
@@ -182,10 +182,14 @@ class ImportCLICommand implements ICLICommand
         ]);
 
         // step 8) import data
-        CLIWCF::getReader()->println(WCF::getLanguage()->get('wcf.acp.dataImport.started'));
+        CLIWCF::getReader()->println(
+            \sprintf("[%s] %s", \date('c'), WCF::getLanguage()->get('wcf.acp.dataImport.started'))
+        );
 
         foreach ($queue as $objectType) {
-            CLIWCF::getReader()->println(WCF::getLanguage()->get('wcf.acp.dataImport.data.' . $objectType));
+            CLIWCF::getReader()->println(
+                \sprintf("[%s] %s", \date('c'), WCF::getLanguage()->get('wcf.acp.dataImport.data.' . $objectType))
+            );
             $workerCommand = CLICommandHandler::getCommand('worker');
             $workerCommand->execute([
                 '--objectType=' . $objectType,
@@ -193,7 +197,9 @@ class ImportCLICommand implements ICLICommand
             ]);
         }
 
-        CLIWCF::getReader()->println(WCF::getLanguage()->get('wcf.acp.dataImport.completed'));
+        CLIWCF::getReader()->println(
+            \sprintf("[%s] %s", \date('c'), WCF::getLanguage()->get('wcf.acp.dataImport.completed'))
+        );
 
         CLIWCF::getReader()->setHistoryEnabled(true);
     }