Change Logging class / method name and Debug Support for backtrace
Debug Support: getCallerClass now returns level 1 class from the trace like the getCallerMethod. There is also a new getCallerClassMethod that returns namespace\class->method (or :: for static). getCallerTopLevelClass works like getCallerClass did before and returns the TOP level (first entry on the call stack that has a set class name) Logging: Do not use the Support getCallerClass/Method/File but call it inside and use level 2 in trace to get the data we need For the last call before debug call Also update the strack trace for the debug call to use ->/:: for method type
This commit is contained in:
@@ -805,7 +805,10 @@ class IO
|
||||
$call_stack[] =
|
||||
($call_trace['file'] ?? 'n/f') . ':'
|
||||
. ($call_trace['line'] ?? '-') . ':'
|
||||
. (!empty($call_trace['class']) ? $call_trace['class'] . '->' : '')
|
||||
. (!empty($call_trace['class']) ?
|
||||
$call_trace['class'] . ($call_trace['type'] ?? '') :
|
||||
''
|
||||
)
|
||||
. $call_trace['function'];
|
||||
}
|
||||
$context = [
|
||||
@@ -825,7 +828,7 @@ class IO
|
||||
);
|
||||
break;
|
||||
default:
|
||||
// used named arguments so we can easy change the order of debug
|
||||
// used named arguments so we can easy change the order of debug
|
||||
$this->log->debug(
|
||||
group_id: $debug_id,
|
||||
message: $error_string,
|
||||
|
||||
Reference in New Issue
Block a user