Append apptask logs

This commit is contained in:
Girish Ramakrishnan
2019-10-03 12:20:15 -07:00
parent c54cd992ca
commit 4d6d768be1

View File

@@ -165,7 +165,7 @@ function startTask(taskId, options, callback) {
assert.strictEqual(typeof callback, 'function');
const logFile = options.logFile || `${paths.TASKS_LOG_DIR}/${taskId}.log`;
let fd = safe.fs.openSync(logFile, 'w'); // will autoclose
let fd = safe.fs.openSync(logFile, 'a'); // will autoclose. append is for apptask logs
if (!fd) {
debug(`startTask: unable to get log filedescriptor ${safe.error.message}`);
return callback(new TaskError(TaskError.INTERNAL_ERROR, safe.error));