Mercurial > libervia-backend
diff src/tools/misc.py @ 993:301b342c697a
core: use of the new core.log module:
/!\ this is a massive refactoring and was largely automated, it probably did bring some bugs /!\
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 19 Apr 2014 19:19:19 +0200 |
parents | 65bf1bc70f6b |
children | ba41a81d14c2 |
line wrap: on
line diff
--- a/src/tools/misc.py Sat Apr 19 16:48:26 2014 +0200 +++ b/src/tools/misc.py Sat Apr 19 19:19:19 2014 +0200 @@ -21,7 +21,8 @@ from sat.core.i18n import _ import sys -from logging import debug, warning +from sat.core.log import getLogger +log = getLogger(__name__) class TriggerException(Exception): @@ -55,9 +56,9 @@ self.__triggers[point_name] = [] if priority != 0 and priority in [trigger_tuple[0] for trigger_tuple in self.__triggers[point_name]]: if priority in (self.MIN_PRIORITY, self.MAX_PRIORITY): - warning(_("There is already a bound priority [%s]") % point_name) + log.warning(_("There is already a bound priority [%s]") % point_name) else: - debug(_("There is already a trigger with the same priority [%s]") % point_name) + log.debug(_("There is already a trigger with the same priority [%s]") % point_name) self.__triggers[point_name].append((priority, callback)) self.__triggers[point_name].sort(key=lambda trigger_tuple: trigger_tuple[0], reverse=True)