logs: prepend date and append newline
This commit is contained in:
@@ -2042,7 +2042,7 @@ async function appendLogLine(app, line) {
|
||||
|
||||
const logFilePath = path.join(paths.LOG_DIR, app.id, 'app.log');
|
||||
|
||||
if (!safe.fs.appendFileSync(logFilePath, line)) console.error(`Could not append log line for app ${app.id} at ${logFilePath}: ${safe.error.message}`);
|
||||
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}`);
|
||||
}
|
||||
|
||||
// does a re-configure when called from most states. for install/clone errors, it re-installs with an optional manifest
|
||||
|
||||
Reference in New Issue
Block a user