FormatterInterface
in
Log formatter interface
Tags
Table of Contents
Methods
- format() : string
- Format a single log entry into a string
Methods
format()
Format a single log entry into a string
public
format(string $level, string $message, array<string|int, mixed> $context) : string
Implementations that embed level/message/context values into a line-delimited or otherwise unescaped text format are responsible for sanitizing them via Pop\Log\Context::sanitize() — Writer\File does not pre-sanitize before calling this method, since not every format needs it (e.g. JSON's own encoding already escapes control characters safely within string values).
Parameters
- $level : string
- $message : string
- $context : array<string|int, mixed>