I\'m trying to Append data to a Log file using Node.js and that is working fine but it is not going to the next line. \\n doesn\'t seem to be working in my fun
var os = require("os");
function processInput ( text )
{
fs.open('H://log.txt', 'a', 666, function( e, id ) {
fs.write( id, text + os.EOL, null, 'utf8', function(){
fs.close(id, function(){
console.log('file is updated');
});
});
});
}