Skip to content

Logs tail command

Kenneth Auchenberg edited this page Oct 31, 2019 · 1 revision

logs tail establishes a direct connection with Stripe and enables you to tail your test mode Stripe API request logs in real-time from your terminal.

By default, logs tail will display all of your test mode request logs. To begin log tailing, run:

$ stripe logs tail

A number of built-in filtering options are also supported:

  • --filter-account, (Connect only) supports connect_in (incoming Connect requests), connect_out (outgoing Connect requests), and self (non-Connect requests)
  • --filter-ip-address, supports a direct match with any ip address
  • --filter-http-method, supports GET, POST, and DELETE
  • --filter-request-path, supports a direct match to any Stripe path (e.g., /v1/charges)
  • --filter-request-status, supports succeeded and failed
  • --filter-source, supports api and dashboard
  • --filter-status-code, supports any status code that is a 200, 400, or 500 (e.g., 404)
  • --filter-status-code-type, supports 2XX, 4XX, and 5XX

Multiple filters can be used together, where a log must match all filters to be shown:

$ stripe logs tail --filter-http-method POST --filter-status-code-type 4XX

Multiple values for a single filter can also be specified as a comma-separated list, where a log only needs to match one of the values:

$ stripe logs tail --filter-http-method GET,POST