Fix for log files not writing correctly

fantomcoin_support
Matthew Little 2014-06-25 11:34:44 -06:00
parent 3d220c7904
commit 35a8d7a506
3 changed files with 3 additions and 4 deletions

View File

@ -22,7 +22,7 @@ catch(e){
return;
}
config.version = "v0.97";
config.version = "v0.98";
require('./lib/logger.js');

View File

@ -7,7 +7,6 @@ var dateFormat = require('dateformat');
module.exports = function(logSystem){
process.on('uncaughtException', function(err) {
console.log('\n' + err.stack + '\n');
var time = dateFormat(new Date(), 'yyyy-mm-dd HH:MM:ss');
fs.appendFile(config.logging.files.directory + '/' + logSystem + '_crash.log', time + '\n' + err.stack + '\n\n', function(err){

View File

@ -28,9 +28,9 @@ var pendingWrites = {};
setInterval(function(){
for (var fileName in pendingWrites){
var data = pendingWrites[data];
var data = pendingWrites[fileName];
fs.appendFile(fileName, data);
delete pendingWrites[fileName];
fs.appendFile(fileName, pendingWrites);
}
}, config.logging.files.flushInterval * 1000);