\Monolog\FormatterLineFormatter

Formats incoming records into a one-line string

This is especially useful for logging to files

Summary

Methods
Properties
Constants
__construct()
format()
formatBatch()
No public properties found
SIMPLE_FORMAT
SIMPLE_DATE
convertToString()
normalize()
$format
$dateFormat
N/A
No private methods found
No private properties found
N/A

Constants

SIMPLE_FORMAT

SIMPLE_FORMAT = "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n"

SIMPLE_DATE

SIMPLE_DATE = "Y-m-d H:i:s"

Properties

$format

$format : 

Type

$dateFormat

$dateFormat : 

Type

Methods

__construct()

__construct(string  $format = null, string  $dateFormat = null) 

Parameters

string $format

The format of the message

string $dateFormat

The format of the timestamp: one supported by DateTime::format

format()

format(array  $record) : mixed

Formats a log record.

Parameters

array $record

A record to format

Returns

mixed —

The formatted record

formatBatch()

formatBatch(array  $records) : mixed

Formats a set of log records.

Parameters

array $records

A set of records to format

Returns

mixed —

The formatted set of records

convertToString()

convertToString(  $data) 

Parameters

$data

normalize()

normalize(  $data) 

Parameters

$data