mirror of
https://github.com/friendica/friendica
synced 2025-04-27 01:50:11 +00:00
Individual callstacks are removed from the logger
This commit is contained in:
parent
d05fbe6e45
commit
e4a37f344e
36 changed files with 66 additions and 86 deletions
|
@ -87,7 +87,7 @@ class Introspection implements IHaveCallIntrospections
|
|||
'line' => $trace[$i - 1]['line'] ?? null,
|
||||
'function' => $trace[$i]['function'] ?? null,
|
||||
'request-id' => $this->requestId,
|
||||
'stack' => System::callstack(10, 0, true, ['Friendica\Core\Logger\Type\StreamLogger', 'Friendica\Core\Logger\Type\AbstractLogger', 'Friendica\Core\Logger\Type\WorkerLogger', 'Friendica\Core\Logger']),
|
||||
'stack' => System::callstack(15, 0, true, ['Friendica\Core\Logger\Type\StreamLogger', 'Friendica\Core\Logger\Type\AbstractLogger', 'Friendica\Core\Logger\Type\WorkerLogger', 'Friendica\Core\Logger']),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ class System
|
|||
|
||||
proc_close($resource);
|
||||
|
||||
$this->logger->info('Executed "proc_open"', ['command' => $cmdline, 'callstack' => System::callstack(10)]);
|
||||
$this->logger->info('Executed "proc_open"', ['command' => $cmdline]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -348,7 +348,7 @@ class System
|
|||
public static function httpError($httpCode, $message = '', $content = '')
|
||||
{
|
||||
if ($httpCode >= 400) {
|
||||
Logger::debug('Exit with error', ['code' => $httpCode, 'message' => $message, 'callstack' => System::callstack(20), 'method' => DI::args()->getMethod(), 'agent' => $_SERVER['HTTP_USER_AGENT'] ?? '']);
|
||||
Logger::debug('Exit with error', ['code' => $httpCode, 'message' => $message, 'method' => DI::args()->getMethod(), 'agent' => $_SERVER['HTTP_USER_AGENT'] ?? '']);
|
||||
}
|
||||
DI::apiResponse()->setStatus($httpCode, $message);
|
||||
|
||||
|
@ -381,7 +381,7 @@ class System
|
|||
public static function jsonError($httpCode, $content, $content_type = 'application/json')
|
||||
{
|
||||
if ($httpCode >= 400) {
|
||||
Logger::debug('Exit with error', ['code' => $httpCode, 'content_type' => $content_type, 'callstack' => System::callstack(20), 'method' => DI::args()->getMethod(), 'agent' => $_SERVER['HTTP_USER_AGENT'] ?? '']);
|
||||
Logger::debug('Exit with error', ['code' => $httpCode, 'content_type' => $content_type, 'method' => DI::args()->getMethod(), 'agent' => $_SERVER['HTTP_USER_AGENT'] ?? '']);
|
||||
}
|
||||
DI::apiResponse()->setStatus($httpCode);
|
||||
self::jsonExit($content, $content_type);
|
||||
|
|
|
@ -1276,7 +1276,7 @@ class Worker
|
|||
$added = 0;
|
||||
|
||||
if (!is_int($priority) || !in_array($priority, self::PRIORITIES)) {
|
||||
Logger::warning('Invalid priority', ['priority' => $priority, 'command' => $command, 'callstack' => System::callstack(20)]);
|
||||
Logger::warning('Invalid priority', ['priority' => $priority, 'command' => $command]);
|
||||
$priority = self::PRIORITY_MEDIUM;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue