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

Log python exceptions in json format #331

Closed
jkroepke opened this issue Mar 4, 2024 · 3 comments
Closed

Log python exceptions in json format #331

jkroepke opened this issue Mar 4, 2024 · 3 comments

Comments

@jkroepke
Copy link
Contributor

jkroepke commented Mar 4, 2024

k8s-sidecare supports json logging, however for any python related exception, the standard format appears on stdout. This is really hard, because on loki, each single line is a dedicated message.

It would be great, if exceptions could be caught in general and can be logging by the configured logging handler

@ChristianGeie
Copy link
Collaborator

JSON logging is also on our bucket list. We wanted to implement this so that you can switch between plain and JSON logging via feature toggle. On the other hand, in a k8s environment we could also do JSON logging exclusively.

Do you already have an approach or a PR draft that implements the JSON logging feature?

@jkroepke
Copy link
Contributor Author

jkroepke commented Mar 7, 2024

Currently, JSON logging is implement, only exception are raises on stdout, as-is.

An draft is here: #333

@ChristianGeie
Copy link
Collaborator

done
see #333

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

No branches or pull requests

2 participants