stripe-cli
stripe-cli copied to clipboard
Allow fetching production mode logs
It would be nice if there was a way to fetch error logs from production, using filters that aren't available via the dashboard https://dashboard.stripe.com/logs
e.g. I'd like to see a list of the latest HTTP 400 invalid_request_error logs, with HTTP 402 card_error logs filtered out in a format that I can pipe through jq to extract more info.
Ideally these filters would be available in the dashboard too, but I can't see a way to do that.
Completely agree this would be really helpful for users, we are actively looking into this!
Are https://dashboard.stripe.com/logs available from the API though?
I looked at the current log tailer implementation – it's based on websockets. Then I looked at OpenAPI spec – there's no evidence of REST API for requests either.
Unless I am missing anything, looks like the logs are not available from anywhere except Dashboard.
@gmile You are correct, request logs are not available through the API at this time. They can only be accessed though the dashboard or the CLI's stripe logs tail command (only in test mode for the latter at this time).
I just submitted a different (but related) feature request #459, which isn't focused on the filters but just having an API method to fetch requests type resources that are accessed at https://dashboard.stripe.com/logs.