With Apache, there is a lot of flexibility in how your TransferLog is constructed, such as with the CustomLog directive, but the ErrorLog seems to be a whole different beast. It's a free-form file, with a simple prefix that occurs before each message block.
What I'm trying to do is capture and re-format errors that are being written to the ErrorLog under mod_perl, such that they can be cross-referenced with the corresponding request in the TransferLog. Right now when errors are generated, you have to make an educated guess as to which request caused it, for example, by looking for an HTTP 500 response at around the same time. This is fairly imprecise, as under heavier loads, you're going to be trying to match up two or more errors to two or more defective requests.
Things like
Apache::Log allow you to write error messages, of course.
Apache::DBILogger only captures TransferLog-type entries. Is there a way to do the same thing for ErrorLog? Maybe I'm missing something, but I've been unable to find any documentation on how this format can be changed.