logs: use %o to format error

otherwise, they are printed as multi-line and this messes up tail+date formatting
This commit is contained in:
Girish Ramakrishnan
2023-04-16 10:49:59 +02:00
parent e6f870b220
commit c4f4f3e914
29 changed files with 70 additions and 73 deletions
+1 -1
View File
@@ -200,7 +200,7 @@ async function updateToLatest(options, auditSource) {
tasks.startTask(taskId, { timeout: 20 * 60 * 60 * 1000 /* 20 hours */, nice: 15, memoryLimit }, async (error) => {
locker.unlock(locker.OP_BOX_UPDATE);
debug('Update failed with error', error);
debug('Update failed with error. %o', error);
const timedOut = error.code === tasks.ETIMEOUT;
await safe(eventlog.add(eventlog.ACTION_UPDATE_FINISH, auditSource, { taskId, errorMessage: error.message, timedOut }));