1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-01 10:50:21 +02:00

added information about call type from debug_backtrace (#1612)

$record['extra']['callType'] will contain current call type: "->" or "::" depending if it was normal or static method call.
Gives possibility to nicely format messages "{$record['extra']['class']}{$record['extra']['callType']}{$record['extra']['function']} ..."
This commit is contained in:
jszczypk
2022-03-18 10:31:44 +01:00
committed by GitHub
parent 0a023ffb23
commit f0e0dbaa52

View File

@@ -101,6 +101,7 @@ class IntrospectionProcessor implements ProcessorInterface
'file' => isset($trace[$i - 1]['file']) ? $trace[$i - 1]['file'] : null,
'line' => isset($trace[$i - 1]['line']) ? $trace[$i - 1]['line'] : null,
'class' => isset($trace[$i]['class']) ? $trace[$i]['class'] : null,
'callType' => isset($trace[$i]['type']) ? $trace[$]['type'] : null,
'function' => isset($trace[$i]['function']) ? $trace[$i]['function'] : null,
]
);