# check the size of the log before the main script starts # check the size again after the logging "sub" scripts are done # if the log has grown, # open it, seek to the original size (start of new data) # read everything that was appended on this run. # filter out anything that you know does NOT describe an error # mail the remainder to interested recipients.