Éric Araujo added the comment:

Hm the correct way to use exception is:

    except Something:
        logger.exception('problem while doing X')

i.e. this is a generic unicode-to-str-with-default-encoding problem, not 
something specific to logging.

Vinay, do you think logging should do something smarter than calling str when 
passed non-str objects?

----------
nosy: +eric.araujo, vinay.sajip
title: Logging throwing UnicodeEncodeError exception -> logging can raise 
UnicodeEncodeError

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17155>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to