Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CustomVariables/Model.php')
-rw-r--r--plugins/CustomVariables/Model.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/CustomVariables/Model.php b/plugins/CustomVariables/Model.php
index 5abb327f0e..7ab4605489 100644
--- a/plugins/CustomVariables/Model.php
+++ b/plugins/CustomVariables/Model.php
@@ -9,10 +9,12 @@
namespace Piwik\Plugins\CustomVariables;
use Piwik\Common;
+use Piwik\Container\StaticContainer;
use Piwik\DataTable;
use Piwik\Db;
use Piwik\Log;
use Piwik\Piwik;
+use Psr\Log\LoggerInterface;
class Model
{
@@ -194,7 +196,10 @@ class Model
$model->addCustomVariable();
}
} catch (\Exception $e) {
- Log::error('Failed to add custom variable: ' . $e->getMessage());
+ StaticContainer::get(LoggerInterface::class)->error('Failed to add custom variable: {exception}', [
+ 'exception' => $e,
+ 'ignoreInScreenWriter' => true,
+ ]);
}
}
}