#llh-logging

1 messages · Page 1 of 1 (latest)

long wave
#

hello! can you explain what you mean by wrapping every SDK call?

fair bough
#

e.g instead of Charge.create I have to make a custom method that wraps it called createCharge, inside I log all the params and the raw response from Stripe

#

so as u can see it gets super tedious

long wave
#

hmm, gimme a while to look into this

#

i don't think there's another way at the moment

fair bough
#

got it thanks!

#

yeah the other option is we don't use the SDK

#

and instead use the REST API

long wave
#

It's up to you, but I strongly recommend using the SDK instead of using the REST API. The library is basically a wrapper for the underlying HTTP requests with some useful features like automatic retries, idempotency keys and robust error handling. You could roll your own, but you'd be reinventing the wheel and would be opening yourself up to all sorts of unhandled edge cases and increasing problems as your integration gets more complex.

fair bough
#

yup understood

#

yeah the logging piece is super important to us

#

so if there is a way to do that w/ the SDK that'd be amazing

long wave
#

i'll pass on the feedback!