aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/parse-log.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-17 11:35:10 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:52 +0100
commitafffe98839db7ccbfa9fb8b7d1413b97900fdc73 (patch)
treef0b3cbe58f73e81a5ba4bb31dabd9691994cf2ca /scripts/parse-log.ts
parent1b3989b0961d22a5a45ad16239e3c3f58f66180c (diff)
downloadPeerTube-afffe98839db7ccbfa9fb8b7d1413b97900fdc73.tar.gz
PeerTube-afffe98839db7ccbfa9fb8b7d1413b97900fdc73.tar.zst
PeerTube-afffe98839db7ccbfa9fb8b7d1413b97900fdc73.zip
Speed up activity pub http requests
Diffstat (limited to 'scripts/parse-log.ts')
-rwxr-xr-xscripts/parse-log.ts8
1 files changed, 7 insertions, 1 deletions
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({
38 38
39rl.on('line', line => { 39rl.on('line', line => {
40 const log = JSON.parse(line) 40 const log = JSON.parse(line)
41 logLevels[log.level](log.message, log.stack) 41 const additionalInfo: any = {}
42
43 Object.keys(log).forEach(logKey => {
44 if (logKey !== 'message' && logKey !== 'level') additionalInfo[logKey] = log[logKey]
45 })
46
47 logLevels[log.level](log.message, additionalInfo)
42}) 48})