fix test noise
TypeError: Cannot read property 'name' of undefined at log (/home/travis/build/rlidwka/sinopia/lib/middleware.js:185:32)
This commit is contained in:
parent
f558c78d32
commit
5b5f56f51c
|
@ -182,7 +182,7 @@ module.exports.log = function(req, res, next) {
|
||||||
req.log.warn({
|
req.log.warn({
|
||||||
request : { method: req.method, url: req.url },
|
request : { method: req.method, url: req.url },
|
||||||
level : 35, // http
|
level : 35, // http
|
||||||
user : req.remote_user.name,
|
user : req.remote_user && req.remote_user.name,
|
||||||
status : res.statusCode,
|
status : res.statusCode,
|
||||||
error : res._sinopia_error,
|
error : res._sinopia_error,
|
||||||
bytes : {
|
bytes : {
|
||||||
|
|
Loading…
Reference in New Issue