Comment 0 for bug 1563295

Revision history for this message
Konstantin (ksnihyr) wrote :

When i used unicode args for log message, i got UnicodeDecodeError
If replace using oslo_log to logging from std python library, logging works fine

[1] Sample script, logging with oslo_log module http://paste.openstack.org/show/492234/
[2] Sample script, logging with Python logging module http://paste.openstack.org/show/492234/
[3] Sample file with unicode data http://paste.openstack.org/show/492235/

How to reproduce:

1 Save [3] as 'text.txt'
2 Run [1]

Expected result:

'log.txt' contains
"жлдоыфв
фыжваофждыов"

Actual result:

Exception "UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
Logged from file oslo_test.py, line 9"