diff --git a/index.js b/index.js index b33c4f2..dcd7dc4 100644 --- a/index.js +++ b/index.js @@ -130,7 +130,7 @@ function morgan (format, options) { stream.write(line + '\n') }; - if (immediate) { + if (immediate || req.headers.upgrade==='websocket') { // immediate log logRequest() } else {