Psr3Formatter
in package
implements
LogFormatter
Tags
Interfaces, Classes, Traits and Enums
Table of Contents
- $defaultContext : array<string|int, mixed>
- Hash of default context values.
- __construct() : mixed
- Constructor.
- format() : string
- Formats an event to be written by the handler.
Properties
$defaultContext
Hash of default context values.
private
array<string|int, mixed>
$defaultContext
Methods
__construct()
Constructor.
public
__construct([array<string|int, string>|array<string|int, Stringable>|array<string|int, int>|array<string|int, float> $defaultContext = [] ]) : mixed
Parameters
- $defaultContext : array<string|int, string>|array<string|int, Stringable>|array<string|int, int>|array<string|int, float> = []
-
Defaults hash for missing context values. Key will be the placeholder, value will be the filled in data. Actual context overwrites defaults
Tags
Return values
mixed —format()
Formats an event to be written by the handler.
public
format(LogMessage $event) : string
Parameters
- $event : LogMessage
-
Log event.
Return values
string —Formatted line.