From 94bc7b3ccec987c5ce1191cf51caf0232143ab7c Mon Sep 17 00:00:00 2001 From: Mauricio Astudillo Toledo Date: Sun, 2 Jun 2024 18:26:57 -0400 Subject: [PATCH] refactor: implement method initializeLogger --- plugin/shared/Helpers/PluginLogger.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/plugin/shared/Helpers/PluginLogger.php b/plugin/shared/Helpers/PluginLogger.php index a90108f..e7d2b54 100644 --- a/plugin/shared/Helpers/PluginLogger.php +++ b/plugin/shared/Helpers/PluginLogger.php @@ -25,15 +25,7 @@ public function __construct(LogConfig $config) { $this->config = $config; $logFilePath = $this->getLogFilePath(); - - $dateFormat = "Y-m-d H:i:s"; - $output = "%datetime% > %level_name% > %message% %context% %extra%\n"; - $formatter = new LineFormatter($output, $dateFormat); - $stream = new RotatingFileHandler($logFilePath, - 100, Logger::DEBUG); - $stream->setFormatter($formatter); - $this->logger = new Logger('transbank'); - $this->logger->pushHandler($stream); + $this->initializeLogger($logFilePath); } private function initializeLogger(string $logFilePath)