How about setting a variable "headers_all" to a Javascript function that collects all headers from request.headersIn[] and returns the concatenated string in some defined format? You can include that variable in your logs.
And as I had to find out myself just now, this suggestion I made does not work because you cannot enumerate the elements of the special objects r.variables and r.headersIn.
It does work if you want to write a bit of code for a new module :-)