Mark Hazen wrote: > I'm sorry I didn't explain an important component. Since I am dealing with > a few hundred requests per minute (this was got me onto mod_perl to begin > with), then using DBI's ability to write to a file would vastly overwhelm my > system.
Won't capturing that much data in RAM instantly send your system into swap? Anyway, you can probably get this to work if you can ask DBI to send to a filehandle and then use your magic IO::Capture on that filehandle. You just can't use STDERR because it's already magic. By the way, at one point we used this DBI trace stuff at eToys. It was fairly light on a fast file system like ext2fs. The trick to making it really light is to fix it so that only one child process per machine had tracing turned on, which you can do with a little fussing with a .pid file and a ChildInitHandler and ChildExitHandler. If you just need to see some trace output, you can use this technique. On the other hand, your debugging may require seeing trace from every active process in which case this won't help. - Perrin