From 311abd46406bcc13d674c28aa8d8dd34765d50b3 Mon Sep 17 00:00:00 2001 From: Cid Lopes Date: Thu, 13 Jun 2024 13:25:30 +0300 Subject: [PATCH] Move logs to own Nosto files --- Logger/DebugHandler.php | 46 ++++++++++++++++++++++++++++++++++++++++ Logger/SystemHandler.php | 46 ++++++++++++++++++++++++++++++++++++++++ etc/di.xml | 4 ++-- 3 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 Logger/DebugHandler.php create mode 100644 Logger/SystemHandler.php diff --git a/Logger/DebugHandler.php b/Logger/DebugHandler.php new file mode 100644 index 000000000..64d9568b8 --- /dev/null +++ b/Logger/DebugHandler.php @@ -0,0 +1,46 @@ + + * @copyright 2020 Nosto Solutions Ltd + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause + * + */ + +namespace Nosto\Tagging\Logger; + +use Magento\Framework\Logger\Handler\Base; +use Monolog\Logger; + +class DebugHandler extends Base +{ + protected $fileName = '/var/log/nosto-debug.log'; + protected $loggerType = Logger::DEBUG; +} diff --git a/Logger/SystemHandler.php b/Logger/SystemHandler.php new file mode 100644 index 000000000..2c3e961b6 --- /dev/null +++ b/Logger/SystemHandler.php @@ -0,0 +1,46 @@ + + * @copyright 2020 Nosto Solutions Ltd + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause + * + */ + +namespace Nosto\Tagging\Logger; + +use Magento\Framework\Logger\Handler\Base; +use Monolog\Logger; + +class SystemHandler extends Base +{ + protected $fileName = '/var/log/nosto-system.log'; + protected $loggerType = Logger::INFO; +} diff --git a/etc/di.xml b/etc/di.xml index 91e2a8564..66a6e2189 100755 --- a/etc/di.xml +++ b/etc/di.xml @@ -76,8 +76,8 @@ nosto - Magento\Framework\Logger\Handler\System - Magento\Framework\Logger\Handler\Debug + Nosto\Tagging\Logger\SystemHandler + Nosto\Tagging\Logger\DebugHandler