We can search -or grep - each line of the log separately to find the each line( or possible lines) of the source code, is there a tool to extract the whole lines of log?
typical log lines are :
TIME USER MODULE: MESSAGE
and one example is
12:00:00.000 AAA BBB: Connection Failed from [XXX] IP [YYY] PORT [ZZZ]
and its source line is
logger(Connection Failed from  IP  PORT );
message is grep-able in the source code, XXX YYY ZZZ are variable parameters
and the code base almost writern by C\C++ in linux.