in reply to perl one line for advanced grep (current line and next one)
Here is my humble variation:
perl -ne "print if /error/ || $last=~/error/; $last=$_;" test_log.txt [download]