public static function clearLog($level = null)
    {
        foreach (self::$files as $fileName => $fileLevel) {
            if ($level === null || $level === $fileLevel) {
                $fileName = self::$path . $fileName;

                if (file_exists($fileName)) {
                    @unlink($fileName);
                }
                continue;
            }
        }

        // Restart current logger instance.
        self::$instance = null;
        self::start();
    }