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_call decorator should work with Path properly #508

Open
antonkulaga opened this issue Dec 20, 2024 · 3 comments
Open

@log_call decorator should work with Path properly #508

antonkulaga opened this issue Dec 20, 2024 · 3 comments

Comments

@antonkulaga
Copy link

So far @log_call fails to propery log Path arguments. As everybody uses pathlib now it causes a lot of headache.

@itamarst
Copy link
Owner

That's a good idea yeah. Would you be interested in opening a PR? Basically you'd add a conversion to strings here: https://github.com/itamarst/eliot/blob/master/eliot/json.py#L24

@antonkulaga
Copy link
Author

I made a PR #511
I also added other types with tests. So far, my team is very pissed with me for using elliot specifically because of its crashes on most of the non-string/non-float objects. If we cannot seriously extent json serialization I will be forced to take eliot out.

@itamarst
Copy link
Owner

itamarst commented Feb 3, 2025

You can write your own JSON serializer easily enough, worst case by copy/pasting the code and tweaking it (it's quite shourt)! You don't have to rely on what's built-in: https://eliot.readthedocs.io/en/stable/outputting/output.html#configuring-logging-output

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