Remove old log method

This commit is contained in:
angelblue05 2016-06-17 22:05:18 -05:00
parent 5658801f72
commit 55998c796f
1 changed files with 1 additions and 22 deletions

View File

@ -9,10 +9,10 @@ import pstats
import sqlite3 import sqlite3
import StringIO import StringIO
import os import os
from datetime import datetime, time
import time import time
import unicodedata import unicodedata
import xml.etree.ElementTree as etree import xml.etree.ElementTree as etree
from datetime import datetime, time
import xbmc import xbmc
import xbmcaddon import xbmcaddon
@ -22,27 +22,6 @@ import xbmcvfs
################################################################################################# #################################################################################################
# Main methods # Main methods
def logMsg(title, msg, level=1):
# Get the logLevel set in UserClient
try:
logLevel = int(window('emby_logLevel'))
except ValueError:
logLevel = 0
if logLevel >= level:
if logLevel == 2: # inspect.stack() is expensive
try:
xbmc.log("%s -> %s : %s" % (title, inspect.stack()[1][3], msg))
except UnicodeEncodeError:
xbmc.log("%s -> %s : %s" % (title, inspect.stack()[1][3], msg.encode('utf-8')))
else:
try:
xbmc.log("%s -> %s" % (title, msg))
except UnicodeEncodeError:
xbmc.log("%s -> %s" % (title, msg.encode('utf-8')))
class Logging(): class Logging():
LOGGINGCLASS = None LOGGINGCLASS = None