plugin.video.torrenter/resources/scrapers/kinopoisk/LOGGER.py

40 lines
1004 B
Python
Raw Normal View History

2015-01-09 14:11:21 +03:00
# -*- coding: utf-8 -*-
#
try:
import xbmcaddon
__settings__ = xbmcaddon.Addon("plugin.video.torrenter")
debug = __settings__.getSetting("debug")
except:
debug = 'true'
def Log(msg, force=False):
try:
print "[torrenter log] " + msg
except UnicodeEncodeError:
print "[torrenter log] " + msg.encode("utf-8", "ignore")
def Debug(msg, force=False):
if debug == 'true' or force:
try:
print "[torrenter] " + msg
except UnicodeEncodeError:
print "[torrenter] " + msg.encode("utf-8", "ignore")
def Info(msg, force=False):
if debug == 'true' or force:
try:
print "[torrenter] " + msg
except UnicodeEncodeError:
print "[torrenter] " + msg.encode("utf-8", "ignore")
def Warn(msg, force=False):
if debug == 'true' or force:
try:
print "[torrenter] " + msg
except UnicodeEncodeError:
print "[torrenter] " + msg.encode("utf-8", "ignore")