diff --git a/src/apps.js b/src/apps.js index b14f072c7..2ef0bd6ff 100644 --- a/src/apps.js +++ b/src/apps.js @@ -2041,8 +2041,9 @@ async function appendLogLine(app, line) { assert.strictEqual(typeof line, 'string'); const logFilePath = path.join(paths.LOG_DIR, app.id, 'app.log'); + const isoDate = new Date(new Date().toUTCString()).toISOString(); - if (!safe.fs.appendFileSync(logFilePath, `${new Date(new Date().toUTCString())} ${line}\n`)) console.error(`Could not append log line for app ${app.id} at ${logFilePath}: ${safe.error.message}`); + if (!safe.fs.appendFileSync(logFilePath, `${isoDate} ${line}\n`)) console.error(`Could not append log line for app ${app.id} at ${logFilePath}: ${safe.error.message}`); } // does a re-configure when called from most states. for install/clone errors, it re-installs with an optional manifest