mpociot / captainhook

Add Webhooks to your Laravel app, arrr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[New Feature] - Allow logging of up to X webhook responses

mpociot opened this issue · comments

In order to analyze possible webhook errors or to just display the results of the last X webhooks, we need a "webhook_logs" table, that will store that information.
It should be configurable how many log entries get stored per webhook.

This feature will require some refactoring.
Right now all Webhook requests are made asynchronous to avoid HTTP timeouts that block the application.

In order to log the response of the webhooks, we need to wait for them.

I think it would be best if the webhook calls would be added to the queue as separate jobs. This way the calls could be made synchronous in order to fetch the result.
If the current queue driver is set to sync , the package will use the current behavior and no logging is available.

Solved in v2.0 by @phroggyy in PR #14