Error Monitoring script

I am runing a monly script in solaris server. If there is any error thrown by the script can be logged in the log. However we cannot open and trace the log every time. We need the monitor script which monitors log or scritpt, if it find some errors, it should shoot out a mail to me.
I have script which shoot out the email at the end of the script.I have written the script at the end of script.But I need the script which needs to monitor the log file or script directly if it grep of find any error in the log or script, immediately it should send a mail to me.
Please assit me to write this script.