From afffe98839db7ccbfa9fb8b7d1413b97900fdc73 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Nov 2017 11:35:10 +0100 Subject: Speed up activity pub http requests --- scripts/parse-log.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts/parse-log.ts') diff --git a/scripts/parse-log.ts b/scripts/parse-log.ts index 8aac6fbda..24a09c885 100755 --- a/scripts/parse-log.ts +++ b/scripts/parse-log.ts @@ -38,5 +38,11 @@ const rl = createInterface({ rl.on('line', line => { const log = JSON.parse(line) - logLevels[log.level](log.message, log.stack) + const additionalInfo: any = {} + + Object.keys(log).forEach(logKey => { + if (logKey !== 'message' && logKey !== 'level') additionalInfo[logKey] = log[logKey] + }) + + logLevels[log.level](log.message, additionalInfo) }) -- cgit v1.2.3