more winston, issue #62

This commit is contained in:
Baris Usakli
2013-08-13 16:00:24 -04:00
parent 1856e394f3
commit dceec0ce46
13 changed files with 43 additions and 51 deletions

View File

@@ -9,7 +9,8 @@ var RDB = require('./redis.js'),
plugins = require('./plugins'),
reds = require('reds'),
postSearch = reds.createSearch('nodebbpostsearch'),
topicSearch = reds.createSearch('nodebbtopicsearch');
topicSearch = reds.createSearch('nodebbtopicsearch'),
winston = require('winston');
(function(PostTools) {
PostTools.isMain = function(pid, tid, callback) {
@@ -111,7 +112,7 @@ var RDB = require('./redis.js'),
threadTools.get_latest_undeleted_pid(postData.tid, function(err, pid) {
if (err && err.message === 'no-undeleted-pids-found') {
threadTools.delete(postData.tid, -1, function(err) {
if (err) console.log('Error: Could not delete topic (tid: ' + postData.tid + ')');
if (err) winston.error('Could not delete topic (tid: ' + postData.tid + ')', err.stack);
});
} else {
posts.getPostField(pid, 'timestamp', function(timestamp) {