Script for Hire

Read this:
http://forum.mikrotik.com/t/logging-of-a-lost-connection/87840/2