Parsing Log File To Create Blacklist

I saw this.

https://wiki.mikrotik.com/wiki/Log_Parser_-_Event_Trigger_Script

Is there anyway to create a blacklist of IP’s that have a “Login Failure” in log file more then 5 times in 5 minutes and them add them to a dynamic list that is black listed for say a week?

No need logging nor scripting for that.

You can use the same approach as in SSH example (multiple address lists with incremental timeouts).