incident-io / catalog-importer

Import data into the incident.io Catalog from a variety of sources.
MIT License
14 stars 4 forks source link

Enable debug logging in the retryable HTTP client #117

Closed isaacseymour closed 4 months ago

isaacseymour commented 4 months ago

This passes the global logger in to the retryablehttp client we use, meaning that, if --debug is enabled, we'll emit debug logs about what HTTP requests are happening and whether they're being retried.

isaacseymour commented 4 months ago

It is chatty, but the logger defaults to logger.Log being at debug level, and only things at info+ get emitted to stdout. Therefore this shouldn't make any change to the output unless you add --debug (which causes all logs to be emitted)

isaacseymour commented 4 months ago

I have double-checked though: had to change how we pass the logger in (sigh).

Without --debug: nice and quiet. With --debug: all the requests get logged ✅