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
Frying pan on the stove
Results (394 votes). Check out past polls.