Skip to content

Commit

Permalink
added information about call type from debug_backtrace (#1612)
Browse files Browse the repository at this point in the history
$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']} ..."
  • Loading branch information
jszczypk authored Mar 18, 2022
1 parent 0a023ff commit f0e0dba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Monolog/Processor/IntrospectionProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public function __invoke(array $record): array
'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,
]
);
Expand Down

0 comments on commit f0e0dba

Please sign in to comment.