Time for action - customizing log processor output
Let's revisit and extend our web server log processor now. Our first versions simply printed text to
sys.stdout when information was encountered. Let's expand upon that a bit. Using Python's built-in string formatters, we'll do a better job at reporting what we find. In fact, we'll delegate that responsibility to the classes responsible for evaluating the parsed log data.
We'll also add some additional processing meta-output as well, such as how many lines we've processed and how long it takes to execute the entire report. This is helpful information as we further extend our log processor.
- We're going to use
logscan-c.pyfrom Chapter 2, Working with the IO System as our base here, so copy it over ...