X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fparse-log.ts;h=58e052b9f6c3ec364358e4fca62176a03e34e090;hb=ae48a71d57516b7ae2c4f3f63d237a4c972f0ded;hp=9e6653ca3ed73d42712b289153902a10343b9b58;hpb=2aaa1a3fdc49be77aec5309dab5507865c38d392;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/parse-log.ts b/scripts/parse-log.ts index 9e6653ca3..58e052b9f 100755 --- a/scripts/parse-log.ts +++ b/scripts/parse-log.ts @@ -40,7 +40,7 @@ const logger = winston.createLogger({ stderrLevels: [], format: winston.format.combine( winston.format.splat(), - labelFormatter, + labelFormatter(), winston.format.colorize(), loggerFormat ) @@ -79,7 +79,7 @@ function run () { // Don't know why but loggerFormat does not remove splat key Object.assign(log, { splat: undefined }) - logLevels[ log.level ](log) + logLevels[log.level](log) }) stream.once('close', () => res()) @@ -90,7 +90,7 @@ function run () { async function getNewestFile (files: string[], basePath: string) { const sorted = await mtimeSortFilesDesc(files, basePath) - return (sorted.length > 0) ? sorted[ 0 ].file : '' + return (sorted.length > 0) ? sorted[0].file : '' } function toTimeFormat (time: string) {