UnicodeDecodeError in log when message includes non-ascii characters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
New
|
Undecided
|
Luis A. Garcia |
Bug Description
Some log messages are being lost due to a UnicodeDecodeError when the message being logged has ASCII characters in it.
To reproduce:
- Add the following message to cinder.mo:
msgid "HTTP exception thrown: %s"
msgstr "\u69cb\u30bd\u30c1 Exception HTTP \u69cb\u30bd\u30c1: %s"
- Restart cinder-api
- Do a GET /backups/999
The following will show up in the log:
2013-09-24 15:33:38.789 INFO cinder.
Traceback (most recent call last):
File "/usr/lib/
msg = self.format(record)
File "/opt/stack/
return logging.
File "/usr/lib/
return fmt.format(record)
File "/opt/stack/
return logging.
File "/usr/lib/
record.message = record.getMessage()
File "/usr/lib/
msg = msg % self.args
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 0: ordinal not in range(128)
Logged from file wsgi.py, line 610
2013-09-24 15:33:38.891 INFO cinder.
The "HTTP exception thrown" message will not be logged, instead the trace is.
Changed in cinder: | |
assignee: | nobody → Luis A. Garcia (luisg-8) |
Unless I'm misunderstanding, this is a duplicate of bug #1225099