\Monolog\ProcessorWebProcessor

Injects url/method and remote IP of the current web request in all records

Summary

Methods
Properties
Constants
__construct()
__invoke()
addExtraField()
No public properties found
No constants found
No protected methods found
$serverData
$extraFields
N/A
appendExtraFields()
No private properties found
N/A

Properties

$serverData

$serverData : array|\ArrayAccess

Type

array|\ArrayAccess

$extraFields

$extraFields : array

Default fields

Array is structured as [key in record.extra => key in $serverData]

Type

array

Methods

__construct()

__construct(array|\ArrayAccess  $serverData = null, array|null  $extraFields = null) 

Parameters

array|\ArrayAccess $serverData

Array or object w/ ArrayAccess that provides access to the $_SERVER data

array|null $extraFields

Field names and the related key inside $serverData to be added. If not provided it defaults to: url, ip, http_method, server, referrer

__invoke()

__invoke(array  $record) : array

Parameters

array $record

Returns

array

addExtraField()

addExtraField(string  $extraName, string  $serverName) : $this

Parameters

string $extraName
string $serverName

Returns

$this

appendExtraFields()

appendExtraFields(array  $extra) : array

Parameters

array $extra

Returns

array