$logline = "Uh, oh! Some error occured. The error code number is 10545."; # this is the string in the log file, it's merely in the code to show it works if you want to try it out.
print $logline . "\n" unless (($logline =~ m/(error)/) && ($logline =~ 10548)); # this is a simple one-liner