Documentation

IntrospectionProcessor
in package
implements ProcessorInterface

Injects line/file:class/function where the log message came from

Warning: This only works if the handler processes the logs directly. If you put the processor on a handler that is behind a FingersCrossedHandler for example, the processor will only be called once the trigger level is reached, and all the log records will have the same file/line/.. data from the call that triggered the FingersCrossedHandler.

Tags
author

Jordi Boggiano j.boggiano@seld.be

phpstan-import-type

Level from \Monolog\Logger

phpstan-import-type

LevelName from \Monolog\Logger

Interfaces, Classes and Traits

ProcessorInterface
An optional interface to allow labelling Monolog processors.

Table of Contents

$level  : int
$skipClassesPartials  : array<string|int, string>
$skipFunctions  : array<string|int, string>
$skipStackFramesCount  : int
__construct()  : mixed
__invoke()  : array<string|int, mixed>
isTraceClassOrSkippedFunction()  : bool

Properties

$skipFunctions

private array<string|int, string> $skipFunctions = ['call_user_func', 'call_user_func_array']

Methods

__construct()

public __construct([string|int $level = Logger::DEBUG ][, array<string|int, string> $skipClassesPartials = [] ], int $skipStackFramesCount) : mixed
Parameters
$level : string|int = Logger::DEBUG

The minimum logging level at which this Processor will be triggered

$skipClassesPartials : array<string|int, string> = []
$skipStackFramesCount : int
Tags
phpstan-param

Level|LevelName|LogLevel::* $level

Return values
mixed

__invoke()

public __invoke(array<string|int, mixed> $record) : array<string|int, mixed>
Parameters
$record : array<string|int, mixed>
Return values
array<string|int, mixed>

The processed record

isTraceClassOrSkippedFunction()

private isTraceClassOrSkippedFunction(array<string|int, array<string|int, mixed>> $trace, int $index) : bool
Parameters
$trace : array<string|int, array<string|int, mixed>>
$index : int
Return values
bool

Search results