express-winston
express-winston copied to clipboard
Log error when request body is null.
Hi,
The function returned by the logger function is throwing an error when trying to deal with a request object with a null body, due to trying to call Object.keys() on a null value.
At lines 307:320 (v3.2.1):
... Object.keys(req.body) ...
Could the check at line 307: if ( req.body !== undefined ) { be adjusted to also check for a null body?
I believe this was fixed with 4.0.0. Can you verify?