This is an easy one, once you've learned the trick of it....
At the end of your script collect the data from the logfile and store it as a variable - then add an IF step that checks the variable for a specific word/phrase/expression, and then your results can be in the THEN/ELSE steps following the IF.
I've had to do very similar things for Symantec/Sophos/AVG so i'm sure it will work for Kaspersky.