iRule is for client traffic not system events. You can check my article https://community.f5.com/t5/technical-forum/knowledge-sharing-ways-to-trigger-and-schedule-scripts-o... about this as you can use iCall to see if the core event is triggered and then to use tool like ''logger -p'' to generate a log message in /var/log/ltm.
Still why you want this as the tmm logs should have such event as I have mentioned in https://community.f5.com/t5/community-articles/knowledge-sharing-investigating-troubleshooting-crash... ? Or you want to trigger a core generation if something seen in the logs? Then iCall can trigger a kill command based on an event in logs https://support.f5.com/csp/article/K13002225 🙂