quieter stdout and stderr logs

This commit is contained in:
ansuz
2016-09-30 15:51:23 +02:00
parent bc73fa2074
commit 4b238de84c
4 changed files with 13 additions and 30 deletions

View File

@@ -1,19 +0,0 @@
var Fs = require("fs");
var message = function(file, msg) {
file.write(msg+"\n");
};
var create = module.exports.create = function(filePath, backingStore) {
var file = Fs.createWriteStream(filePath, {flags: 'a+'});
var originalMessageFunction = backingStore.message;
backingStore.message = function(channel, msg, callback) {
message(file, msg);
originalMessageFunction(channel, msg, callback);
};
return backingStore;
};

View File

@@ -171,7 +171,6 @@ module.exports.create = function (conf, cb) {
root: conf.filePath || './datastore',
channels: { },
};
console.log('storing data in ' + env.root);
Fs.mkdir(env.root, function (err) {
if (err && err.code !== 'EEXIST') {
// TODO: somehow return a nice error