Skip to content

Commit

Permalink
Fix for log files not writing correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
zone117x committed Jun 25, 2014
1 parent 3d220c7 commit 35a8d7a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion init.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ catch(e){
return;
}

config.version = "v0.97";
config.version = "v0.98";

require('./lib/logger.js');

Expand Down
1 change: 0 additions & 1 deletion lib/exceptionWriter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
4 changes: 2 additions & 2 deletions lib/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 35a8d7a

Please sign in to comment.