def __get_logs(self): vpn_logpath = translate('special://profile/addon_data/plugin.program.vpnicity/') log_path = translate('special://logpath') crashlog_path = None crashfile_match = None if condition('system.platform.osx') or condition('system.platform.ios'): crashlog_path = os.path.join( os.path.expanduser('~'), 'Library/Logs/CrashReporter' ) crashfile_match = 'XBMC' elif condition('system.platform.windows'): crashlog_path = log_path crashfile_match = '.dmp' elif condition('system.platform.linux'): crashlog_path = os.path.expanduser('~') crashfile_match = 'xbmc_crashlog' # get fullpath for kodi.log and kodi.old.log vpn_log = os.path.join(vpn_logpath, 'openvpn.log') log = os.path.join(log_path, 'kodi.log') log_old = os.path.join(log_path, 'kodi.old.log') # check for XBMC crashlogs log_crash = None if crashlog_path and os.path.isdir(crashlog_path) and crashfile_match: crashlog_files = [s for s in os.listdir(crashlog_path) if os.path.isfile(os.path.join(crashlog_path, s)) and crashfile_match in s] if crashlog_files: # we have crashlogs, get fullpath from the last one by time crashlog_files = self.__sort_files_by_date(crashlog_path, crashlog_files) log_crash = os.path.join(crashlog_path, crashlog_files[-1]) found_logs = [] if os.path.isfile(vpn_log): found_logs.append({ 'title': 'openvpn.log', 'path': vpn_log }) if os.path.isfile(log): found_logs.append({ 'title': 'kodi.log', 'path': log }) if not self.skip_oldlog and os.path.isfile(log_old): found_logs.append({ 'title': 'kodi.old.log', 'path': log_old }) if log_crash and os.path.isfile(log_crash): found_logs.append({ 'title': 'crash.log', 'path': log_crash }) return found_logs
def __get_logs(self): xbmc_version=xbmc.getInfoLabel("System.BuildVersion") version=float(xbmc_version[:4]) log_path = translate('special://logpath') crashlog_path = None crashfile_match = None if condition('system.platform.osx') or condition('system.platform.ios'): crashlog_path = os.path.join( os.path.expanduser('~'), 'Library/Logs/CrashReporter' ) if version < 14: crashfile_match = 'XBMC' else: crashfile_match = 'kodi' elif condition('system.platform.windows'): crashlog_path = log_path crashfile_match = '.dmp' elif condition('system.platform.linux'): crashlog_path = os.path.expanduser('~') if version < 14: crashfile_match = 'xbmc_crashlog' else: crashfile_match = 'kodi_crashlog' # get fullpath for xbmc.log and xbmc.old.log if version < 14: log = os.path.join(log_path, 'xbmc.log') log_old = os.path.join(log_path, 'xbmc.old.log') else: log = os.path.join(log_path, 'kodi.log') log_old = os.path.join(log_path, 'kodi.old.log') # check for XBMC crashlogs log_crash = None if crashlog_path and os.path.isdir(crashlog_path) and crashfile_match: crashlog_files = [s for s in os.listdir(crashlog_path) if os.path.isfile(os.path.join(crashlog_path, s)) and crashfile_match in s] if crashlog_files: # we have crashlogs, get fullpath from the last one by time crashlog_files = self.__sort_files_by_date(crashlog_path, crashlog_files) log_crash = os.path.join(crashlog_path, crashlog_files[-1]) found_logs = [] if os.path.isfile(log): if version < 14: found_logs.append({ 'title': 'xbmc.log', 'path': log }) else: found_logs.append({ 'title': 'kodi.log', 'path': log }) if log_crash and os.path.isfile(log_crash): found_logs.append({ 'title': 'crash.log', 'path': log_crash }) return found_logs
def __get_logs(self): vpn_logpath = translate( 'special://profile/addon_data/plugin.program.vpnicity/') log_path = translate('special://logpath') crashlog_path = None crashfile_match = None if condition('system.platform.osx') or condition( 'system.platform.ios'): crashlog_path = os.path.join(os.path.expanduser('~'), 'Library/Logs/CrashReporter') crashfile_match = 'XBMC' elif condition('system.platform.windows'): crashlog_path = log_path crashfile_match = '.dmp' elif condition('system.platform.linux'): crashlog_path = os.path.expanduser('~') crashfile_match = 'xbmc_crashlog' # get fullpath for kodi.log and kodi.old.log vpn_log = os.path.join(vpn_logpath, 'openvpn.log') log = os.path.join(log_path, 'kodi.log') log_old = os.path.join(log_path, 'kodi.old.log') # check for XBMC crashlogs log_crash = None if crashlog_path and os.path.isdir(crashlog_path) and crashfile_match: crashlog_files = [ s for s in os.listdir(crashlog_path) if os.path.isfile(os.path.join(crashlog_path, s)) and crashfile_match in s ] if crashlog_files: # we have crashlogs, get fullpath from the last one by time crashlog_files = self.__sort_files_by_date( crashlog_path, crashlog_files) log_crash = os.path.join(crashlog_path, crashlog_files[-1]) found_logs = [] if os.path.isfile(vpn_log): found_logs.append({'title': 'openvpn.log', 'path': vpn_log}) if os.path.isfile(log): found_logs.append({'title': 'kodi.log', 'path': log}) if not self.skip_oldlog and os.path.isfile(log_old): found_logs.append({'title': 'kodi.old.log', 'path': log_old}) if log_crash and os.path.isfile(log_crash): found_logs.append({'title': 'crash.log', 'path': log_crash}) return found_logs
def __get_logs(self): log_path = translate("special://logpath") crashlog_path = None crashfile_match = None if condition("system.platform.osx") or condition("system.platform.ios"): crashlog_path = os.path.join(os.path.expanduser("~"), "Library/Logs/CrashReporter") crashfile_match = "XBMC" elif condition("system.platform.windows"): crashlog_path = log_path crashfile_match = ".dmp" elif condition("system.platform.linux"): crashlog_path = os.path.expanduser("~") crashfile_match = "xbmc_crashlog" # get fullpath for kodi.log and kodi.old.log log = os.path.join(log_path, "kodi.log") log_old = os.path.join(log_path, "kodi.old.log") # check for XBMC crashlogs log_crash = None if crashlog_path and os.path.isdir(crashlog_path) and crashfile_match: crashlog_files = [ s for s in os.listdir(crashlog_path) if os.path.isfile(os.path.join(crashlog_path, s)) and crashfile_match in s ] if crashlog_files: # we have crashlogs, get fullpath from the last one by time crashlog_files = self.__sort_files_by_date(crashlog_path, crashlog_files) log_crash = os.path.join(crashlog_path, crashlog_files[-1]) found_logs = [] if os.path.isfile(log): found_logs.append({"title": "kodi.log", "path": log}) if not self.skip_oldlog and os.path.isfile(log_old): found_logs.append({"title": "kodi.old.log", "path": log_old}) if log_crash and os.path.isfile(log_crash): found_logs.append({"title": "crash.log", "path": log_crash}) return found_logs
def GetLogs(): log_path = translate('special://logpath') log = os.path.join(log_path, 'kodi.log') return log
def __get_logs(self): log_path = translate('special://logpath')
def GetLogs( ): log_path = translate('special://logpath') log = os.path.join(log_path, 'kodi.log') return log