From 3aa5cea8fec998805e32c0480884906d8e4fd490 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 19 Jun 2018 10:45:33 +0200 Subject: Upgrade dependencies --- scripts/create-transcoding-job.ts | 3 --- scripts/parse-log.ts | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/create-transcoding-job.ts b/scripts/create-transcoding-job.ts index 179fb4fa6..3ea30f98e 100755 --- a/scripts/create-transcoding-job.ts +++ b/scripts/create-transcoding-job.ts @@ -1,7 +1,4 @@ import * as program from 'commander' -import { createReadStream } from 'fs' -import { join } from 'path' -import { createInterface } from 'readline' import { VideoModel } from '../server/models/video/video' import { initDatabaseModels } from '../server/initializers' import { JobQueue } from '../server/lib/job-queue' diff --git a/scripts/parse-log.ts b/scripts/parse-log.ts index 2c5ef696d..9f67c0d53 100755 --- a/scripts/parse-log.ts +++ b/scripts/parse-log.ts @@ -1,3 +1,4 @@ +import * as program from 'commander' import { createReadStream } from 'fs' import { join } from 'path' import { createInterface } from 'readline' @@ -5,6 +6,10 @@ import * as winston from 'winston' import { labelFormatter } from '../server/helpers/logger' import { CONFIG } from '../server/initializers/constants' +program + .option('-l, --level [level]', 'Level log (debug/info/warn/error)') + .parse(process.argv) + const excludedKeys = { level: true, message: true, @@ -27,7 +32,7 @@ const loggerFormat = winston.format.printf((info) => { const logger = new winston.createLogger({ transports: [ new winston.transports.Console({ - level: 'debug', + level: program['level'] || 'debug', stderrLevels: [], format: winston.format.combine( winston.format.splat(), -- cgit v1.2.3