From 938cafeb7747648766caaa41fdf1dd7c389177dd Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Mon, 27 Jan 2014 14:47:48 -0800 Subject: [PATCH] Remove message prefix as debug will print it --- lib/models/user.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/models/user.js b/lib/models/user.js index 61a67313..7a062da7 100644 --- a/lib/models/user.js +++ b/lib/models/user.js @@ -144,24 +144,24 @@ User.login = function (credentials, fn) { var defaultError = new Error('login failed'); if(err) { - debug('User: error reported from User.findOne: %j', err); + debug('An error is reported from User.findOne: %j', err); fn(defaultError); } else if(user) { user.hasPassword(credentials.password, function(err, isMatch) { if(err) { - debug('User: error reported from User.hasPassword: %j', err); + debug('An error is reported from User.hasPassword: %j', err); fn(defaultError); } else if(isMatch) { user.accessTokens.create({ ttl: Math.min(credentials.ttl || User.settings.ttl, User.settings.maxTTL) }, fn); } else { - debug('User: invalid password for user %s', query.email || query.username); + debug('The password is invalid for user %s', query.email || query.username); fn(defaultError); } }); } else { - debug('User: no matching record found for user %s', query.email || query.username); + debug('No matching record is found for user %s', query.email || query.username); fn(defaultError); } });