Tool/script for sending email when error in logfile

Hi,
I am looking for a tool/script to send emails in case there are errors in the logfile.
Would it be possibleaybe to use the email server configuration used in basic settings for this ?
As I am running nc on a rpi I would look for a lightweight solution.
Thank you for any ideas.