in reply to Parsing a file in "chunks"

First of all hope you already have the "manager" application for tomcat, which is a useful basic monitoring tool. Also look at the most filtered log, so you don't parse a more general and much more active log than the DB.log. The tomcat logs should be set up as such. You might also run into the problem (at some stage) of the tomcat logs being rotated.
Another way to tackle the original problem with the log is to join all lines with a space, to a line starting with a date. Shouldn't be too difficult with a regex. Then you merely grep for your DBPool or SQLException or whatever.
the hardest line to type correctly is: stty erase ^H