Documentation

GitProcessor
in package
implements ProcessorInterface

Injects Git branch and Git commit SHA in all records

Tags
author

Nick Otter

author

Jordi Boggiano j.boggiano@seld.be

Table of Contents

Interfaces

ProcessorInterface
An optional interface to allow labelling Monolog processors.

Properties

$cache  : array{branch: string, commit: string}|array<string|int, never>|null
$level  : Level

Methods

__construct()  : mixed
__invoke()  : LogRecord
getGitInfo()  : array{branch: string, commit: string}|array<string|int, never>

Properties

$cache

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

Methods

__construct()

public __construct([int|string|Level|LogLevel::* $level = Level::Debug ]) : mixed
Parameters
$level : int|string|Level|LogLevel::* = Level::Debug

The minimum logging level at which this Processor will be triggered

Tags
phpstan-param

value-ofLevel::VALUES|value-ofLevel::NAMES|Level|LogLevel::* $level

getGitInfo()

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

        
On this page

Search results