Skip to content

Commit

Permalink
refactor: implement method getLogFilePath
Browse files Browse the repository at this point in the history
  • Loading branch information
mastudillot committed Jun 2, 2024
1 parent a7a1b4c commit f7943f2
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 @@ -23,16 +23,8 @@ final class PluginLogger implements ILogger {
*/
public function __construct(LogConfig $config) {
$this->config = $config;
$logFileName = $this->getLogFileNameFromCache();

if (!$logFileName) {
$logFileName = $this->getLogFileName();
$expireTime = strtotime('tomorrow') - time();
$this->saveLogFileNameInCache($logFileName, $expireTime);
}

$logDir = $this->getLogDir();
$logFilePath = $logDir . $logFileName;
$logFilePath = $this->getLogFilePath();

$dateFormat = "Y-m-d H:i:s";
$output = "%datetime% > %level_name% > %message% %context% %extra%\n";
Expand Down

0 comments on commit f7943f2

Please sign in to comment.