W3cubDocs

/Symfony 4.1

ConsoleFormatter

class ConsoleFormatter implements FormatterInterface

Formats incoming records for console output by coloring them depending on log level.

Constants

SIMPLE_FORMAT
SIMPLE_DATE

Methods

__construct(array $options = array())

Available options: * format: The format of the outputted log string. The following placeholders are supported: %datetime%, %start_tag%, %level_name%, %end_tag%, %channel%, %message%, %context%, %extra%; * date_format: The format of the outputted date string; * colors: If true, the log string contains ANSI code to add color; * multiline: If false, "context" and "extra" are dumped on one line.

formatBatch(array $records)

{@inheritdoc}

format(array $record)

{@inheritdoc}

echoLine($line, $depth, $indentPad)
castObject($v, array $a, Stub $s, $isNested)

Details

__construct(array $options = array())

Available options: * format: The format of the outputted log string. The following placeholders are supported: %datetime%, %start_tag%, %level_name%, %end_tag%, %channel%, %message%, %context%, %extra%; * date_format: The format of the outputted date string; * colors: If true, the log string contains ANSI code to add color; * multiline: If false, "context" and "extra" are dumped on one line.

Parameters

array $options

formatBatch(array $records)

{@inheritdoc}

Parameters

array $records

format(array $record)

{@inheritdoc}

Parameters

array $record

echoLine($line, $depth, $indentPad)

Parameters

$line
$depth
$indentPad

castObject($v, array $a, Stub $s, $isNested)

Parameters

$v
array $a
Stub $s
$isNested

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.html