Injects Git branch and Git commit SHA in all records.
More...
Injects Git branch and Git commit SHA in all records.
- Author
- Nick Otter
-
Jordi Boggiano j.bog.nosp@m.gian.nosp@m.o@sel.nosp@m.d.be
Definition at line 22 of file GitProcessor.php.
◆ __construct()
Monolog\Processor\GitProcessor::__construct |
( |
|
$level = Logger::DEBUG | ) |
|
◆ __invoke()
Monolog\Processor\GitProcessor::__invoke |
( |
array |
$record | ) |
|
◆ getGitInfo()
static Monolog\Processor\GitProcessor::getGitInfo |
( |
| ) |
|
|
staticprivate |
Definition at line 48 of file GitProcessor.php.
54 $branches = `git branch -v --no-abbrev`;
55 if (preg_match(
'{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) {
56 return self::$cache = array(
57 'branch' => $matches[1],
58 'commit' => $matches[2],
62 return self::$cache = array();
◆ $cache
Monolog\Processor\GitProcessor::$cache |
|
staticprivate |
◆ $level
Monolog\Processor\GitProcessor::$level |
|
private |
The documentation for this class was generated from the following file: