PMCORE-1335 ProcessMaker core should be use the native Laravel log mechanism.

This commit is contained in:
Roly Rudy Gutierrez Pinto
2020-08-10 17:11:55 -04:00
parent 061d4531f1
commit c865e65658
45 changed files with 731 additions and 1535 deletions

View File

@@ -2,6 +2,7 @@
use App\Jobs\GenerateReportTable;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use ProcessMaker\Core\JobsManager;
use ProcessMaker\Model\Application;
@@ -614,14 +615,12 @@ class ReportTables
try {
$rs = $stmt->executeQuery($sQuery);
} catch (Exception $e) {
Bootstrap::registerMonolog(
'sqlExecution',
400,
'Sql Execution',
['sql' => $sQuery, 'error' => $e->getMessage()],
config("system.workspace"),
'processmaker.log'
);
$message = 'Sql Execution';
$context = [
'sql' => $sQuery,
'error' => $e->getMessage()
];
Log::channel(':sqlExecution')->error($message, Bootstrap::context($context));
}
}
} else {
@@ -666,14 +665,12 @@ class ReportTables
try {
$rs = $stmt->executeQuery($sQuery);
} catch (Exception $e) {
Bootstrap::registerMonolog(
'sqlExecution',
400,
'Sql Execution',
['sql' => $sQuery, 'error' => $e->getMessage()],
config("system.workspace"),
'processmaker.log'
);
$message = 'Sql Execution';
$context = [
'sql' => $sQuery,
'error' => $e->getMessage()
];
Log::channel(':sqlExecution')->error($message, Bootstrap::context($context));
}
}
} else {