WildfireFormatter
extends NormalizerFormatter
in package
Serializes a log message according to Wildfire's header requirements
Tags
Table of Contents
Constants
- SIMPLE_DATE = "Y-m-d H:i:s"
- TABLE = 'table'
Properties
- $dateFormat : mixed
- $logLevels : mixed
- Translates Monolog log levels to Wildfire levels.
Methods
- __construct() : mixed
- format() : mixed
- Formats a log record.
- formatBatch() : mixed
- Formats a set of log records.
- normalize() : mixed
- normalizeException() : mixed
- toJson() : string
- Return the JSON representation of a value
Constants
SIMPLE_DATE
public
mixed
SIMPLE_DATE
= "Y-m-d H:i:s"
TABLE
public
mixed
TABLE
= 'table'
Properties
$dateFormat
protected
mixed
$dateFormat
$logLevels
Translates Monolog log levels to Wildfire levels.
private
mixed
$logLevels
= array(\Monolog\Logger::DEBUG => 'LOG', \Monolog\Logger::INFO => 'INFO', \Monolog\Logger::NOTICE => 'INFO', \Monolog\Logger::WARNING => 'WARN', \Monolog\Logger::ERROR => 'ERROR', \Monolog\Logger::CRITICAL => 'ERROR', \Monolog\Logger::ALERT => 'ERROR', \Monolog\Logger::EMERGENCY => 'ERROR')
Methods
__construct()
public
__construct([string $dateFormat = null ]) : mixed
Parameters
- $dateFormat : string = null
-
The format of the timestamp: one supported by DateTime::format
format()
Formats a log record.
public
format(array<string|int, mixed> $record) : mixed
Parameters
- $record : array<string|int, mixed>
-
A record to format
Return values
mixed —The formatted record
formatBatch()
Formats a set of log records.
public
formatBatch(array<string|int, mixed> $records) : mixed
Parameters
- $records : array<string|int, mixed>
-
A set of records to format
Return values
mixed —The formatted set of records
normalize()
protected
normalize(mixed $data[, mixed $depth = 0 ]) : mixed
Parameters
- $data : mixed
- $depth : mixed = 0
normalizeException()
protected
normalizeException(mixed $e) : mixed
Parameters
- $e : mixed
toJson()
Return the JSON representation of a value
protected
toJson(mixed $data[, bool $ignoreErrors = false ]) : string
Parameters
- $data : mixed
- $ignoreErrors : bool = false