Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All special characters in jobs/pods logs #177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PeekLeon
Copy link

Hi,

I have an issue with special characters disappearing from Kubernetes logs.

I noticed issue #122, which removes all non-ASCII characters, but this also filters out characters like é, è, à, etc., which causes my French messages to be truncated.

I would like to replace:

log.info(line.encode('ascii', 'ignore'))

with:

try:
    log.info(line)
except:
    log.info(line.encode('ascii', 'ignore'))

I added the try/except as a fallback, but I believe it may not be necessary since log.info(line) already works fine.

Would this change be acceptable?

Here are some screenshots

logs output :
all-chars

Job :
job

Wait-for :
wait-for

Characters used : ✅ ! # $ % & ' ( )éèàùüêûîô * + , - . / ; < = > ? @ [ \ ] ^ _ ` { | } ~µ🧙‍

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant