GetTimezonedDateFromUTCDate(date('c')) . " - [" . \strtoupper($type) . "] --> " . $message . "\r\n"; $path = self::GetLogFilePath(); \file_put_contents($path, $line, FILE_APPEND); } static function LogError($message) { self::Log(LogManager::TYPE_ERROR, $message); } static function LogDebug($message) { self::Log(LogManager::TYPE_DEBUG, $message); } private static function ShouldLog($type) { if(self::$LogOptions == null) { $settings = new SettingsRepository(self::$loader); self::$LogOptions = $settings->GetLog(); } return self::$LogOptions->Enable && (self::$LogOptions->LogType <= $type); } static function RemoveLog() { $path = self::GetLogFilePath(); if(\file_exists($path)) \unlink($path); } public static function GetLogFilePath() { return self::$fileManager->GetLoggerPath() . '/log.txt'; } }