mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Add logging
Prevent error in event profiling modules are not part of the standard python library
This commit is contained in:
parent
00fd67cab3
commit
8cd4cb903e
2 changed files with 5 additions and 3 deletions
|
@ -2,11 +2,10 @@
|
||||||
|
|
||||||
#################################################################################################
|
#################################################################################################
|
||||||
|
|
||||||
import cProfile
|
|
||||||
import inspect
|
import inspect
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import pstats
|
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import StringIO
|
import StringIO
|
||||||
import os
|
import os
|
||||||
|
@ -288,6 +287,8 @@ def profiling(sortby="cumulative"):
|
||||||
# Will print results to Kodi log
|
# Will print results to Kodi log
|
||||||
def decorator(func):
|
def decorator(func):
|
||||||
def wrapper(*args, **kwargs):
|
def wrapper(*args, **kwargs):
|
||||||
|
import cProfile
|
||||||
|
import pstats
|
||||||
|
|
||||||
pr = cProfile.Profile()
|
pr = cProfile.Profile()
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ class Service():
|
||||||
|
|
||||||
# Initial logging
|
# Initial logging
|
||||||
log.warn("======== START %s ========" % self.addonName)
|
log.warn("======== START %s ========" % self.addonName)
|
||||||
|
log.warn("Python Version: %s", sys.version)
|
||||||
log.warn("Platform: %s" % (self.clientInfo.getPlatform()))
|
log.warn("Platform: %s" % (self.clientInfo.getPlatform()))
|
||||||
log.warn("KODI Version: %s" % xbmc.getInfoLabel('System.BuildVersion'))
|
log.warn("KODI Version: %s" % xbmc.getInfoLabel('System.BuildVersion'))
|
||||||
log.warn("%s Version: %s" % (self.addonName, self.clientInfo.getVersion()))
|
log.warn("%s Version: %s" % (self.addonName, self.clientInfo.getVersion()))
|
||||||
|
|
Loading…
Reference in a new issue