Mercurial > libervia-backend
diff src/plugins/plugin_xep_0020.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 | 1fe00f0c9a91 |
children | 069ad98b360d |
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0020.py Sat Apr 19 16:48:26 2014 +0200 +++ b/src/plugins/plugin_xep_0020.py Sat Apr 19 19:19:19 2014 +0200 @@ -18,7 +18,8 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. from sat.core.i18n import _ -from logging import debug, info, warning, error +from sat.core.log import getLogger +log = getLogger(__name__) from twisted.words.protocols.jabber import client, jid from twisted.words.xish import domish @@ -47,7 +48,7 @@ class XEP_0020(object): def __init__(self, host): - info(_("Plugin XEP_0020 initialization")) + log.info(_("Plugin XEP_0020 initialization")) def getHandler(self, profile): return XEP_0020_handler() @@ -68,7 +69,7 @@ values = form.fields[field].values result[field] = values[0] if values else None if len(values) > 1: - warning(_("More than one value choosed for %s, keeping the first one") % field) + log.warning(_("More than one value choosed for %s, keeping the first one") % field) return result def negociate(self, feature_elt, form_type, negociable_values):