diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-20 00:32:04 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-20 00:32:04 +0200 |
commit | 52ec86c18b649676b3231aa3730583041c132bd7 (patch) | |
tree | 6b985b01cc4f0ab3426c65912b2f967c05f3fbde /module | |
parent | Improve packagetools regex 2 (diff) | |
download | pyload-52ec86c18b649676b3231aa3730583041c132bd7.tar.xz |
Improve log functions
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/Plugin.py | 13 |
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): |