IntrospectionProcessor extends AbstractProcessor
Introspection processor to automatically add where the log record came from.
Table of Contents
Properties
- $appendFullBackTrace : bool
- Add the full backtrace to the log entry or just the last entry of the backtrace
- $shiftBackTraceLevel : int
- Number of entries to shift from the backtrace
Methods
- __construct() : mixed
- Constructs this log processor
- processLogRecord() : LogRecord
- Add debug backtrace information to logRecord It adds: filepath, line number, class and function name
- setAppendFullBackTrace() : IntrospectionProcessor
- Set if the full backtrace should be added to the log or just the last item
- setShiftBackTraceLevel() : IntrospectionProcessor
- Set the number of levels to be shift from the backtrace
- getDebugBacktrace() : array<string|int, mixed>
- Get the debug backtrace
- shiftBacktraceLevel() : array<string|int, mixed>
- Shift the first item from the backtrace
Properties
$appendFullBackTrace
Add the full backtrace to the log entry or just the last entry of the backtrace
protected
bool
$appendFullBackTrace
= false
$shiftBackTraceLevel
Number of entries to shift from the backtrace
protected
int
$shiftBackTraceLevel
= 0
Methods
__construct()
Constructs this log processor
public
__construct([array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $options : array<string|int, mixed> = []
-
Configuration options - depends on the actual processor
Tags
processLogRecord()
Add debug backtrace information to logRecord It adds: filepath, line number, class and function name
public
processLogRecord(LogRecord $logRecord) : LogRecord
Parameters
- $logRecord : LogRecord
-
The log record to process
Tags
Return values
LogRecord —The processed log record with additional data
setAppendFullBackTrace()
Set if the full backtrace should be added to the log or just the last item
public
setAppendFullBackTrace(bool $appendFullBackTrace) : IntrospectionProcessor
Parameters
- $appendFullBackTrace : bool
-
If the full backtrace should be added
Return values
IntrospectionProcessorsetShiftBackTraceLevel()
Set the number of levels to be shift from the backtrace
public
setShiftBackTraceLevel(int $shiftBackTraceLevel) : IntrospectionProcessor
Parameters
- $shiftBackTraceLevel : int
-
Numbers of levels to shift
Return values
IntrospectionProcessorgetDebugBacktrace()
Get the debug backtrace
protected
getDebugBacktrace() : array<string|int, mixed>
Return values
array<string|int, mixed>shiftBacktraceLevel()
Shift the first item from the backtrace
protected
shiftBacktraceLevel(array<string|int, mixed> $backtrace) : array<string|int, mixed>
Parameters
- $backtrace : array<string|int, mixed>