]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/parse-log.ts
Remove unused i18n build
[github/Chocobozzz/PeerTube.git] / scripts / parse-log.ts
index 83ad45b72a84fa46637023161b123233bde21efc..58e052b9f6c3ec364358e4fca62176a03e34e090 100755 (executable)
@@ -1,3 +1,6 @@
+import { registerTSPaths } from '../server/helpers/register-ts-paths'
+registerTSPaths()
+
 import * as program from 'commander'
 import { createReadStream, readdir } from 'fs-extra'
 import { join } from 'path'
@@ -37,7 +40,7 @@ const logger = winston.createLogger({
       stderrLevels: [],
       format: winston.format.combine(
         winston.format.splat(),
-        labelFormatter,
+        labelFormatter(),
         winston.format.colorize(),
         loggerFormat
       )
@@ -76,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())
@@ -87,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) {