Track 17 · Lesson 6 of 12
Project: web server log analyzer
Parse a web shop's access log with a regular expression, then count status codes, rank endpoints, detect bursts of server errors and write an incident report.
You will be able to
- Write a regular expression with named groups that parses one log line into a dictionary
- Read a log file defensively, skipping blank lines and counting malformed ones
- Count and rank records with Counter and a sort key that breaks ties
- Detect error spikes by grouping requests per minute and applying a threshold
- Combine small, tested functions into a readable plain-text report
Included with a Formula Quest membership
It has 6 graded exercises with feedback, hints and solutions. Python Quest is included in Formula Quest memberships that cover Python; membership and billing are managed on Formula Quest.
View Formula Quest memberships
Tracks 1 and 2, the first lesson of every track, the playground and the dataset library are free.