Skip to content

Node.js based forum software built for the modern web

show stack

barisusaklic640e0196972
diff --git a/src/database/mongo.js b/src/database/mongo.js
index 4f38b9fe3e..dc65e3ce0d 100644
--- a/src/database/mongo.js
+++ b/src/database/mongo.js
@@ -75,8 +75,8 @@
if(nconf.get('mongo:password') && nconf.get('mongo:username')) {
db.authenticate(nconf.get('mongo:username'), nconf.get('mongo:password'), function (err) {
- if(err) {
- winston.error(err.message);
+ if (err) {
+ winston.error(err.stack);
process.exit();
}
createIndices();
diff --git a/src/meta/configs.js b/src/meta/configs.js
index ea8e17dc3a..1a542e8e9c 100644
--- a/src/meta/configs.js
+++ b/src/meta/configs.js
@@ -14,7 +14,7 @@ module.exports = function(Meta) {
Meta.configs.list(function (err, config) {
if (err) {
- winston.error(err);
+ winston.error(err.stack);
return callback(err);
}
diff --git a/src/meta/templates.js b/src/meta/templates.js
index ccc95c7ab7..4851d19016 100644
--- a/src/meta/templates.js
+++ b/src/meta/templates.js
@@ -83,7 +83,7 @@ Templates.compile = function(callback) {
fs.writeFile(path.join(viewsPath, relativePath), file, next);
}, function(err) {
if (err) {
- winston.error(err);
+ winston.error('[themes] ' + err.stack);
} else {
winston.info('[themes] Successfully compiled templates.');
emitter.emit('templates:compiled');
diff --git a/src/user/email.js b/src/user/email.js
index 892d740e0f..fe79771fbb 100644
--- a/src/user/email.js
+++ b/src/user/email.js
@@ -46,7 +46,7 @@ var async = require('async'),
user.getUserField(uid, 'username', function(err, username) {
if (err) {
- return winston.error(err.message);
+ return winston.error(err.stack);
}
var title = meta.config.title || meta.config.browserTitle || 'NodeBB';