What I've done for now is replace the lines at 675 and 676 of (src/http/modules/ngx_http_log_module.c):
674: if (value == NULL || value->not_found) {
675: *buf = '-';
676: return buf + 1;
677: }
with:
674: if (value == NULL || value->not_found) {
675: *buf = 0;
676: return buf;
677: }
I hope this won't cause any issues. It seems to be working very nicely. Here's a see one-liner if anyone is interested in doing the same thing:
sed -n '1h;1!H;${;g;s/buf = \W-\W;\(\s*return buf\) + 1;/buf = 0;\1;/g;p;}' src/http/modules/ngx_http_log_module.c > src/http/modules/ngx_http_log_module.c.new && mv -f src/http/modules/ngx_http_log_module.c.new src/http/modules/ngx_http_log_module.c
It would be nice in the future to be able to set the "NULL" character for the log module.