server/sources/__init__.py
changeset 10832 2350424585f8
parent 10651 9ca33768473c
child 10845 75c60e58ce6b
--- a/server/sources/__init__.py	Tue Sep 22 14:20:53 2015 +0200
+++ b/server/sources/__init__.py	Tue Sep 08 06:48:48 2015 +0200
@@ -27,6 +27,7 @@
 from six import text_type
 
 from logilab.common import configuration
+from logilab.common.textutils import unormalize
 from logilab.common.deprecation import deprecated
 
 from yams.schema import role_name
@@ -108,7 +109,9 @@
         self.public_config['use-cwuri-as-url'] = self.use_cwuri_as_url
         self.remove_sensitive_information(self.public_config)
         self.uri = source_config.pop('uri')
-        set_log_methods(self, getLogger('cubicweb.sources.'+self.uri))
+        # unormalize to avoid non-ascii characters in logger's name, this will cause decoding error
+        # on logging
+        set_log_methods(self, getLogger('cubicweb.sources.' + unormalize(unicode(self.uri))))
         source_config.pop('type')
         self.update_config(None, self.check_conf_dict(eid, source_config,
                                                       fail_if_unknown=False))