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
JSON log formatting #776
Comments
Hello @neilpanchal. What do you think of an approach like #913 ? If we made that change, then you would have access to the underlying params used to construct the log message when defining your own formatter, so there should be no need to monkey-patch/modify "logfmt" in util. For example:
|
Anybody else feel free to chime in, too! We're happy to merge #913 and we think this solves the use case here, but we want to validate it against a user just to be sure! @liveFreeOrCode (great handle, btw) I noticed you gave the issue a thumb. Would you be willing to take a glance at #913 to see if it would solve your problem? |
@richardm-stripe This would work well, thanks for taking the time to address. We've since removed logging stripe records, so I am not able to test things but from what I can see, LGMT and seems reasonable. |
Released in v5.1.0 |
Hello,
It would be great to allow users to format logs in json format instead of the hardcoded
logfmt
format in the library. For those looking to make this work, this is how we did it:Reference this class from
stripe_log_formatter.py
in log ini configuration file as follows:And then at import time, monkey patch stripe library:
Any chance we can get an ability to configure our own log formatter?
The text was updated successfully, but these errors were encountered: