Skip to content

Commit

Permalink
refactor: implement method initializeLogger
Browse files Browse the repository at this point in the history
  • Loading branch information
mastudillot committed Jun 2, 2024
1 parent 459cda4 commit 94bc7b3
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions plugin/shared/Helpers/PluginLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 94bc7b3

Please sign in to comment.