Cecil

PrintLogger extends AbstractLogger

PrintLogger class.

This logger prints messages to the standard output. It supports different log levels and can be configured to print only messages up to a certain verbosity level.

Table of Contents

Properties

$printLevelMax  : int
$verbosityLevelMap  : array<string|int, mixed>

Methods

__construct()  : mixed
Print only the $printLevelMax.
format()  : string
Format expression to string.
log()  : void
{@inheritdoc}
interpolate()  : string
Interpolates context values into the message placeholders.

Properties

$verbosityLevelMap

protected array<string|int, mixed> $verbosityLevelMap = [\Psr\Log\LogLevel::EMERGENCY => \Cecil\Builder::VERBOSITY_NORMAL, \Psr\Log\LogLevel::ALERT => \Cecil\Builder::VERBOSITY_NORMAL, \Psr\Log\LogLevel::CRITICAL => \Cecil\Builder::VERBOSITY_NORMAL, \Psr\Log\LogLevel::ERROR => \Cecil\Builder::VERBOSITY_NORMAL, \Psr\Log\LogLevel::WARNING => \Cecil\Builder::VERBOSITY_NORMAL, \Psr\Log\LogLevel::NOTICE => \Cecil\Builder::VERBOSITY_NORMAL, \Psr\Log\LogLevel::INFO => \Cecil\Builder::VERBOSITY_VERBOSE, \Psr\Log\LogLevel::DEBUG => \Cecil\Builder::VERBOSITY_DEBUG]

Methods

__construct()

Print only the $printLevelMax.

public __construct([int|null $printLevelMax = null ]) : mixed
Parameters
$printLevelMax : int|null = null

format()

Format expression to string.

public static format(mixed $expression) : string
Parameters
$expression : mixed
Return values
string

log()

{@inheritdoc}

public log(mixed $level, string|Stringable $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
$level : mixed
$message : string|Stringable
$context : array<string|int, mixed> = []

interpolate()

Interpolates context values into the message placeholders.

protected interpolate(string $message, array<string|int, mixed> $context) : string
Parameters
$message : string
$context : array<string|int, mixed>
Tags
author

PHP Framework Interoperability Group

Return values
string
 
On this page

Search results