log_analyzer : Reduce greps, increase performance

Grep only one instead of twice each for all functions and error
functions. This reduces time taken by the analyzer to nearly half.