Merged in bugfix/PMCORE-1335 (pull request #7332)
PMCORE-1335 ProcessMaker core should be use the native Laravel log mechanism Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
5e8d0a8f02
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
@@ -264,7 +265,9 @@ class Designer extends Controller
|
||||
}
|
||||
Tracker::authentication($_SESSION['CASE'], $_SESSION['PIN']);
|
||||
} catch (\Exception $e) {
|
||||
Bootstrap::registerMonolog('CaseTracker', 400, $e->getMessage(), [], config("system.workspace"), 'processmaker.log');
|
||||
$message = $e->getMessage();
|
||||
$context = [];
|
||||
Log::channel(':CaseTracker')->error($message, Bootstrap::context($context));
|
||||
\G::header('Location: /errors/error403.php');
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Model\AdditionalTables as AdditionalTablesModel;
|
||||
use ProcessMaker\Validation\ExceptionRestApi;
|
||||
@@ -1221,11 +1222,13 @@ class pmTablesProxy extends HttpProxyController
|
||||
$additionalTables->populateReportTable($table['ADD_TAB_NAME'], PmTable::resolveDbSource($table['DBS_UID']), $table['ADD_TAB_TYPE'], $table['PRO_UID'], $table['ADD_TAB_GRID'], $table['ADD_TAB_UID']);
|
||||
$result->message = G::LoadTranslation("ID_THE_REPORT_TABLE_IS_REGENERATING_PLEASE_COME_BACK_IN_A_FEW_MINUTES");
|
||||
} catch (Exception $e) {
|
||||
$context = Bootstrap::getDefaultContextLog();
|
||||
$context['proUid'] = $table['PRO_UID'];
|
||||
$context['tableName'] = $table['ADD_TAB_NAME'];
|
||||
$context['message'] = $e->getMessage();
|
||||
Bootstrap::registerMonolog('dataReport', 500, 'Generation of data report could not be completed', $context, $context['workspace'], 'processmaker.log');
|
||||
$message = 'Generation of data report could not be completed';
|
||||
$context = [
|
||||
'proUid' => $table['PRO_UID'],
|
||||
'tableName' => $table['ADD_TAB_NAME'],
|
||||
'message' => $e->getMessage()
|
||||
];
|
||||
Log::channel(':dataReport')->critical($message, Bootstrap::context($context));
|
||||
|
||||
$result->message = 'Generation of data report could not be completed. Please check the processmaker.log for more details.';
|
||||
$result->success = false;
|
||||
|
||||
Reference in New Issue
Block a user