I am trying to append a string to a log file. However writeFile will erase the content each time before writing the string.
fs.writeFile(\'log.txt\'
const inovioLogger = (logger = "") => { const log_file = fs.createWriteStream(__dirname + `/../../inoviopay-${new Date().toISOString().slice(0, 10)}.log`, { flags: 'a' }); const log_stdout = process.stdout; log_file.write(logger + '\n'); }