1
0
Fork 0
mirror of synced 2024-06-01 18:39:57 +12:00

Add a 'detailedTrace' extra for the logger library

This commit is contained in:
Bradley Schofield 2022-03-18 10:05:38 +00:00
parent d021fb6cda
commit 8c984a555f
4 changed files with 4 additions and 0 deletions

View file

@ -353,6 +353,7 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project, $l
$log->addExtra('file', $error->getFile());
$log->addExtra('line', $error->getLine());
$log->addExtra('trace', $error->getTraceAsString());
$log->addExtra('detailedTrace', $error->getTrace());
$log->addExtra('roles', Authorization::$roles);
$action = $route->getLabel("sdk.namespace", "UNKNOWN_NAMESPACE") . '.' . $route->getLabel("sdk.method", "UNKNOWN_METHOD");

View file

@ -95,6 +95,7 @@ function logError(Throwable $error, string $action, Utopia\Route $route = null)
$log->addExtra('file', $error->getFile());
$log->addExtra('line', $error->getLine());
$log->addExtra('trace', $error->getTraceAsString());
$log->addExtra('detailedTrace', $error->getTrace());
$log->setAction($action);

View file

@ -285,6 +285,7 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo
$log->addExtra('file', $th->getFile());
$log->addExtra('line', $th->getLine());
$log->addExtra('trace', $th->getTraceAsString());
$log->addExtra('detailedTrace', $th->getTrace());
$log->addExtra('roles', Authorization::$roles);
$action = $route->getLabel("sdk.namespace", "UNKNOWN_NAMESPACE") . '.' . $route->getLabel("sdk.method", "UNKNOWN_METHOD");

View file

@ -74,6 +74,7 @@ $logError = function(Throwable $error, string $action) use ($register) {
$log->addExtra('file', $error->getFile());
$log->addExtra('line', $error->getLine());
$log->addExtra('trace', $error->getTraceAsString());
$log->addExtra('detailedTrace', $error->getTrace());
$log->setAction($action);