" . $message . "\r\n"; $path = self::GetLogFilePath(); \file_put_contents($path, $line, FILE_APPEND); } static function SetShouldLog($shouldLog) { self::$ShouldLog = $shouldLog; } static function LogError($message) { self::Log(self::TYPE_ERROR, $message); } static function LogDebug($message) { self::Log(self::TYPE_DEBUG, $message); } private static function ShouldLog($type = null) { if (self::$ShouldLog === null) self::$ShouldLog = get_option('rnadem_enable_log') == "1"; return self::$ShouldLog; } static function RemoveLog() { $path = self::GetLogFilePath(); if (\file_exists($path)) \unlink($path); } public static function GetLogFilePath() { return self::$fileManager->GetLoggerPath() . '/log.txt'; } }