Documentation

MercurialProcessor
in package
implements ProcessorInterface

Injects Hg branch and Hg revision number in all records

Tags
author

Jonathan A. Schweder jonathanschweder@gmail.com

phpstan-import-type

LevelName from \Monolog\Logger

phpstan-import-type

Level from \Monolog\Logger

Interfaces, Classes and Traits

ProcessorInterface
An optional interface to allow labelling Monolog processors.

Table of Contents

$cache  : array{branch: string, revision: string}|array<string|int, never>|null
$level  : Level
__construct()  : mixed
__invoke()  : array<string|int, mixed>
getMercurialInfo()  : array{branch: string, revision: string}|array<string|int, never>

Properties

$cache

private static array{branch: string, revision: string}|array<string|int, never>|null $cache = null

Methods

__construct()

public __construct([int|string $level = Logger::DEBUG ]) : mixed
Parameters
$level : int|string = Logger::DEBUG

The minimum logging level at which this Processor will be triggered

Tags
phpstan-param

Level|LevelName|LogLevel::* $level

Return values
mixed

__invoke()

public __invoke(array<string|int, mixed> $record) : array<string|int, mixed>
Parameters
$record : array<string|int, mixed>
Return values
array<string|int, mixed>

The processed record

getMercurialInfo()

private static getMercurialInfo() : array{branch: string, revision: string}|array<string|int, never>
Return values
array{branch: string, revision: string}|array<string|int, never>

Search results