Add plugins version to logs

[MAILPOET-4735]
This commit is contained in:
Pavel Dohnal
2022-11-23 11:34:40 +01:00
committed by Veljko V
parent 02b82c04f3
commit fd1331e602
3 changed files with 18 additions and 2 deletions

View File

@ -0,0 +1,13 @@
<?php declare (strict_types=1);
namespace MailPoet\Logging;
use MailPoet\Config\Env;
class PluginVersionProcessor {
public function __invoke(array $record): array {
$record['extra']['free_plugin_version'] = Env::$version;
$record['extra']['premium_plugin_version'] = defined('MAILPOET_PREMIUM_VERSION') ? MAILPOET_PREMIUM_VERSION : 'premium not installed';
return $record;
}
}