diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/create-transcoding-job.ts | 3 | ||||
-rwxr-xr-x | scripts/parse-log.ts | 7 |
2 files changed, 6 insertions, 4 deletions
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 @@ | |||
1 | import * as program from 'commander' | 1 | import * as program from 'commander' |
2 | import { createReadStream } from 'fs' | ||
3 | import { join } from 'path' | ||
4 | import { createInterface } from 'readline' | ||
5 | import { VideoModel } from '../server/models/video/video' | 2 | import { VideoModel } from '../server/models/video/video' |
6 | import { initDatabaseModels } from '../server/initializers' | 3 | import { initDatabaseModels } from '../server/initializers' |
7 | import { JobQueue } from '../server/lib/job-queue' | 4 | 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 @@ | |||
1 | import * as program from 'commander' | ||
1 | import { createReadStream } from 'fs' | 2 | import { createReadStream } from 'fs' |
2 | import { join } from 'path' | 3 | import { join } from 'path' |
3 | import { createInterface } from 'readline' | 4 | import { createInterface } from 'readline' |
@@ -5,6 +6,10 @@ import * as winston from 'winston' | |||
5 | import { labelFormatter } from '../server/helpers/logger' | 6 | import { labelFormatter } from '../server/helpers/logger' |
6 | import { CONFIG } from '../server/initializers/constants' | 7 | import { CONFIG } from '../server/initializers/constants' |
7 | 8 | ||
9 | program | ||
10 | .option('-l, --level [level]', 'Level log (debug/info/warn/error)') | ||
11 | .parse(process.argv) | ||
12 | |||
8 | const excludedKeys = { | 13 | const excludedKeys = { |
9 | level: true, | 14 | level: true, |
10 | message: true, | 15 | message: true, |
@@ -27,7 +32,7 @@ const loggerFormat = winston.format.printf((info) => { | |||
27 | const logger = new winston.createLogger({ | 32 | const logger = new winston.createLogger({ |
28 | transports: [ | 33 | transports: [ |
29 | new winston.transports.Console({ | 34 | new winston.transports.Console({ |
30 | level: 'debug', | 35 | level: program['level'] || 'debug', |
31 | stderrLevels: [], | 36 | stderrLevels: [], |
32 | format: winston.format.combine( | 37 | format: winston.format.combine( |
33 | winston.format.splat(), | 38 | winston.format.splat(), |