← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1563295] Re: Inconsistent behaviour when unicode args used for logging

 

** No longer affects: nova

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1563295

Title:
  Inconsistent behaviour when unicode args used for logging

Status in oslo.log:
  Confirmed

Bug description:
  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:

  File 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"

  $ pip freeze|grep oslo.log

  oslo.log==3.2.0

To manage notifications about this bug go to:
https://bugs.launchpad.net/oslo.log/+bug/1563295/+subscriptions