Put all apptask logs of an app in the same log file

This commit is contained in:
Johannes Zellner
2018-06-04 20:22:32 +02:00
parent e9400e5dce
commit 8fa99fae1a
2 changed files with 4 additions and 2 deletions

View File

@@ -128,10 +128,10 @@ function startAppTask(appId, callback) {
// ensure log folder
mkdirp.sync(path.join(paths.LOG_DIR, appId));
var logFilePath = path.join(paths.LOG_DIR, appId, 'apptask-' + Date.now() + '.log');
var logFilePath = path.join(paths.LOG_DIR, appId, 'apptask.log');
// will autoclose
fs.open(logFilePath, 'w', function (error, fd) {
fs.open(logFilePath, 'a', function (error, fd) {
if (error) {
debug('Unable to open log file, queueing task for %s', appId, error);
gPendingTasks.push(appId);