Answers for "nodejs write to log file"

0

nodejs write to log file

var access = fs.createWriteStream(dir + '/node.access.log', { flags: 'a' })
      , error = fs.createWriteStream(dir + '/node.error.log', { flags: 'a' });

// redirect stdout / stderr
proc.stdout.pipe(access);
proc.stderr.pipe(error);
Posted by: Guest on May-17-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language