summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-20 00:32:04 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-20 00:32:04 +0200
commit52ec86c18b649676b3231aa3730583041c132bd7 (patch)
tree6b985b01cc4f0ab3426c65912b2f967c05f3fbde /module
parentImprove packagetools regex 2 (diff)
downloadpyload-52ec86c18b649676b3231aa3730583041c132bd7.tar.xz
Improve log functions
Diffstat (limited to 'module')
-rw-r--r--module/plugins/Plugin.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index d17776485..57da4d114 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -59,17 +59,20 @@ class Base(object):
self.config = core.config
#log functions
+ def logDebug(self, *args):
+ self.log.debug("%s: %s" % (self.__name__, " | ".join([a if isinstance(a, basestring) else str(a) for a in args if a])))
+
def logInfo(self, *args):
- self.log.info("%s: %s" % (self.__name__, " | ".join([a if isinstance(a, basestring) else str(a) for a in args])))
+ self.log.info("%s: %s" % (self.__name__, " | ".join([a if isinstance(a, basestring) else str(a) for a in args if a])))
def logWarning(self, *args):
- self.log.warning("%s: %s" % (self.__name__, " | ".join([a if isinstance(a, basestring) else str(a) for a in args])))
+ self.log.warning("%s: %s" % (self.__name__, " | ".join([a if isinstance(a, basestring) else str(a) for a in args if a])))
def logError(self, *args):
- self.log.error("%s: %s" % (self.__name__, " | ".join([a if isinstance(a, basestring) else str(a) for a in args])))
+ self.log.error("%s: %s" % (self.__name__, " | ".join([a if isinstance(a, basestring) else str(a) for a in args if a])))
- def logDebug(self, *args):
- self.log.debug("%s: %s" % (self.__name__, " | ".join([a if isinstance(a, basestring) else str(a) for a in args])))
+ def logCritical(self, *args):
+ self.log.critical("%s: %s" % (self.__name__, " | ".join([a if isinstance(a, basestring) else str(a) for a in args if a])))
def setConf(self, option, value):