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"
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/ paste.openstack .org/show/ 492234/ paste.openstack .org/show/ 492235/
[2] Sample script, logging with Python logging module http://
[3] Sample file with unicode data http://
How to reproduce:
1 Save [3] as 'text.txt'
2 Run [1]
Expected result:
'log.txt' contains
"жлдоыфв
фыжваофждыов"
Actual result:
Exception "UnicodeDecodeE rror: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
Logged from file oslo_test.py, line 9"