How to log the result of an action?
-
I need to be able to log the result of each action that gets run as to whether it succeeded and an error message if it failed. I can throw an exception to cause the status to be ‘failed’ but the exception message doesn’t get stored anywhere, so that doesn’t help much. Is there already a way to do this that I am missing or do I have to make my own table and track it separately?
Another option would be to add a column to wp_actionscheduler_actions to store an error message and update that myself, but I can’t see any way to get the action_id from within the hook that gets called to be able to update that table. Is it possible to get it or is there a better way to do this?
Thanks
- The topic ‘How to log the result of an action?’ is closed to new replies.