Milan Zamazal has posted comments on this change. Change subject: logging: Don't crash on non-ASCII in SimpleLogAdapter ......................................................................
Patch Set 2: (1 comment) https://gerrit.ovirt.org/#/c/48542/2/vdsm/logUtils.py File vdsm/logUtils.py: Line 92: def process(self, msg, kwargs): Line 93: result = '' Line 94: for key, value in self.extra.iteritems(): Line 95: if isinstance(value, unicode): Line 96: value = value.encode('utf-8', 'replace') > Can you show unicode value that cannot be encoded as utf8 and needs the 're You're right, there seems to be no such value; the unicode->string direction should be safe. Line 97: result += '%s=`%s`' % (key, value) Line 98: if isinstance(msg, unicode): Line 99: msg = msg.encode('utf-8', 'replace') Line 100: result += '::%s' % msg -- To view, visit https://gerrit.ovirt.org/48542 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1930817ade1799b218913348ffa099aab2211ef7 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Milan Zamazal <mzama...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal <mzama...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Vinzenz Feenstra <vfeen...@redhat.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches