Grepping A Log File

Posted on March 2010

Scenario: A user takes an online survey. The user’s record is updated as having taken the test but not completing it. The user claims to have taken the survey, and wants to know what went wrong in the system. Caveat: The user took the test over a month ago.

After connecting to the server and combing through the code, you find nothing that indicates an issue should have occurred. In a lightbulb moment, you decide to check the log files for errors. One small problem. The log file is 10MB large, and has data in it that goes back over a year.

What should you do? Grep to the rescue.