Excluding events
You can get started quickly with Logger for Statamic by updating your .env
file, but to exclude specific events, you will need to tweak the configuration file.
First of all, make sure you've published the configuration file:
1php artisan vendor:publish --tag=statamic-logger-config
Look for the exclude array - this is an array of fully-qualified class names you want to exclude from being logged.
By default, this is an empty array.
1'exclude' => [2 3],
If you wanted to exclude the \Statamic\Events\EntryCreated::class
from being listened to, simply add that to the array.
1'exclude' => [2 \Statamic\Events\EntryCreated::class3],
You can add as many as you want or need.
Subscribing to new events is a little more involved - but still possible. Keep reading for more details on subscribing to your own events.