Add logFile option to startTask

This commit is contained in:
Girish Ramakrishnan
2019-08-27 11:38:12 -07:00
parent e560c18b57
commit f535b3de2f
2 changed files with 7 additions and 3 deletions

View File

@@ -574,7 +574,8 @@ function mailboxNameForLocation(location, manifest) {
}
function startAppTask(appId, callback) {
let task = tasks.startTask(tasks.TASK_APP, [ appId ]);
const logFile = path.join(paths.LOG_DIR, appId, 'apptask.log');
let task = tasks.startTask(tasks.TASK_APP, [ appId ], { logFile });
task.on('start', function (taskId) {
appdb.update(appId, { taskId: taskId }, function (error) {
if (error) return callback(new AppsError(AppsError.INTERNAL_ERROR, error));