fix: show all mensagens in log of background process.

This commit is contained in:
vnmedeiros 2021-03-27 11:59:39 -03:00
parent d6fedad073
commit 25355e9817
3 changed files with 10 additions and 5 deletions

View File

@ -355,12 +355,14 @@ abstract class Exporter {
}
public function add_log($message ) {
$date_key = '[' . date("Y-m-d H:i:s") . '] ';
$count = count($this->log);
$date_key = sprintf("[%' 9d | %s]", $count, date("Y-m-d H:i:s"));
$this->log[$date_key] = $message;
}
public function add_error_log($message ) {
$date_key = '[' . date("Y-m-d H:i:s") . '] ';
$count = count($this->log);
$date_key = sprintf("[%' 9d | %s]", $count, date("Y-m-d H:i:s"));
$this->error_log[$date_key] = $message;
}

View File

@ -146,7 +146,8 @@ abstract class Generic_Process {
}
public function add_log($message ) {
$date_key = '[' . date("Y-m-d H:i:s") . '] ';
$count = count($this->log);
$date_key = sprintf("[%' 9d | %s]", $count, date("Y-m-d H:i:s"));
$this->log[$date_key] = $message;
}

View File

@ -345,11 +345,13 @@ abstract class Importer {
* @param $messagelog
*/
public function add_log($message ) {
$date_key = '[' . date("Y-m-d H:i:s") . '] ';
$count = count($this->log);
$date_key = sprintf("[%' 9d | %s]", $count, date("Y-m-d H:i:s"));
$this->log[$date_key] = $message;
}
public function add_error_log($message ){
$date_key = '[' . date("Y-m-d H:i:s") . '] ';
$count = count($this->log);
$date_key = sprintf("[%' 9d | %s]", $count, date("Y-m-d H:i:s"));
$this->error_log[$date_key] = $message;
}