How would you write a script to parse logs and extract meaningful security events from a massive log file?