Logtivity provides a flexible API to store custom events in your sites’ activity logs.
There’s an example of logging a custom event is below. This example is recording information from Stripe.com for a customer:
Logtivity::log()
->setAction('My Custom Action')
->addMeta('Meta Label', $meta)
->addMeta('Another Meta label', $someOtherMeta)
->addUserMeta('Stripe Customer ID', $stripeCustomerId)
->send();