webhook icon indicating copy to clipboard operation
webhook copied to clipboard

Custom logging

Open sparkacus opened this issue 1 year ago • 0 comments

Unless the source of the request retains data relating to a webhook, it can be tricky to identify why rules are not matched without enabling debug mode.

Would it be possible to support some form of custom logging that can output specific data? e.g. :

  • parm in the hook rules to enable logging for specific values
  • parm in the definition to log all values defined within the hook rules
  • parm in the definition that allows us to selectively define what values to log (regardless of rules)
[webhook] 2023/12/29 12:00:01 [652810] incoming HTTP POST request from {IP}:{PORT}
[webhook] 2023/12/29 12:00:01 [652810] slack got matched
[webhook] 2023/12/29 12:00:01 [652810] slack got matched, but didn't get triggered because the trigger rules were not satisfied
[webhook] 2023/12/29 12:00:01 [652810] 200 | 30 B | 266.65µs | {HOST} | POST /hooks/slack

[webhook] 2023/12/29 12:00:01 [652810] {CUSTOM LOGGING}

sparkacus avatar Dec 29 '23 14:12 sparkacus