当node.js express
站点上发生错误时,其日志文件不会显示发生错误的 url。它显示了先前请求的 url。但是要调试错误,我需要知道导致错误的 url。
GET /some/local/url?page=2 200 339ms - 68b # previus request
http.js:704 # error request without url
throw new Error('Can\'t set headers after they are sent.');
^
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (http.js:704:11)
我永远使用和nginx
. 那么如何让它显示导致日志文件错误的url呢?