Each time a chunk of the response body is sent, it is logged. After a maximum number of bytes (1024 * 1024 by default) is reached, the response body is no longer logged and only a count of the written bytes is returned in its place.
Wrapper wraps both node's ServerResponse.write and ServerResponse.end method calls, not the response itself. Since express' response.send, response.json and response.jsonp all end up calling node's end method, the other wrappers became redundant.
Extras:
interval wasn't being logged since the HttpLogger.hrmillis static method was being called from a logger instance and not from the class, this was modified and now that is the case.
node's response._headers has been deprecated. Now, its corresponding getter is used instead.
ServerResponse.write
andServerResponse.end
method calls, not the response itself. Since express'response.send
,response.json
andresponse.jsonp
all end up calling node'send
method, the other wrappers became redundant.interval
wasn't being logged since theHttpLogger.hrmillis
static method was being called from a logger instance and not from the class, this was modified and now that is the case.response._headers
has been deprecated. Now, its corresponding getter is used instead.