awslogs
awslogs copied to clipboard
Improve UTF8 support
If logs contained non ASCII characters, awslogs get
could fail with:
UnicodeEncodeError: 'charmap' codec can't encode characters in position: character maps to <undefined>
In print(' '.join(output))
This commit forces all output to be UTF8 encoded bytes.
For me it failed on ▓ character.
Bump. I've experienced this problem myself
UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f512' in position 345: character maps to <undefined>
This will also likely close issues:
- https://github.com/jorgebastida/awslogs/issues/99
- https://github.com/jorgebastida/awslogs/issues/121
- https://github.com/jorgebastida/awslogs/issues/147
- https://github.com/jorgebastida/awslogs/issues/156
- https://github.com/jorgebastida/awslogs/issues/157
- https://github.com/jorgebastida/awslogs/issues/165
- https://github.com/jorgebastida/awslogs/issues/215
- https://github.com/jorgebastida/awslogs/issues/255
- https://github.com/jorgebastida/awslogs/issues/273
- https://github.com/jorgebastida/awslogs/issues/299
- https://github.com/jorgebastida/awslogs/issues/300
- https://github.com/jorgebastida/awslogs/issues/339
- https://github.com/jorgebastida/awslogs/issues/348
- https://github.com/jorgebastida/awslogs/issues/364
- https://github.com/jorgebastida/awslogs/issues/366
- https://github.com/jorgebastida/awslogs/issues/376
Change set LGTM.
Thank you very much for your suggestion. I'll need to refresh my head, but I don't think output
could actually be something other than a list
. Will ammend the code and release a new version.