Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The reason is that the ERROR line has pertinent info the line directly above it in the log file. Here is some sample data:open (DIFFR, "/tmp/log.diff"); while (<DIFFR>) { $line=$_; #read first line chomp($line); if ($line =~ /ERROR/) { print CSVFILE "$line,"; }
2004.12.01 20:00:49.307 Agent.AgentLOG saveToSYS_AGENT_RUN_LOG() ourhost(10.10.52.36) ERROR: ********* memo == *** End Execution
|
---|