From 03be668c458efcd26553ad9af86b639a0010a137 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 30 May 2017 13:03:06 +0300 Subject: [PATCH] Improve console command logging --- app/Console/Commands/CheckData.php | 1 + app/Console/Commands/InitLookup.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/CheckData.php b/app/Console/Commands/CheckData.php index fa3590b75f47..67c168b030ec 100644 --- a/app/Console/Commands/CheckData.php +++ b/app/Console/Commands/CheckData.php @@ -103,6 +103,7 @@ class CheckData extends Command private function logMessage($str) { + $str = date('Y-m-d h:i:s') . ' ' . $str; $this->info($str); $this->log .= $str . "\n"; } diff --git a/app/Console/Commands/InitLookup.php b/app/Console/Commands/InitLookup.php index 3ffbec1217b4..715a33c7f308 100644 --- a/app/Console/Commands/InitLookup.php +++ b/app/Console/Commands/InitLookup.php @@ -315,7 +315,9 @@ class InitLookup extends Command private function logMessage($str) { - $this->log .= date('Y-m-d h:i:s') . ' ' . $str . "\n"; + $str = date('Y-m-d h:i:s') . ' ' . $str; + $this->info($str); + $this->log .= $str . "\n"; } private function logError($str)