diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-19 10:45:33 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-19 10:45:33 +0200 |
commit | 3aa5cea8fec998805e32c0480884906d8e4fd490 (patch) | |
tree | 9f0e67cd549417da4395687825184a4bfe4ab809 /scripts/parse-log.ts | |
parent | c305467cd784345b87703a98c2cc7f0f7d8ba196 (diff) | |
download | PeerTube-3aa5cea8fec998805e32c0480884906d8e4fd490.tar.gz PeerTube-3aa5cea8fec998805e32c0480884906d8e4fd490.tar.zst PeerTube-3aa5cea8fec998805e32c0480884906d8e4fd490.zip |
Upgrade dependencies
Diffstat (limited to 'scripts/parse-log.ts')
-rwxr-xr-x | scripts/parse-log.ts | 7 |
1 files changed, 6 insertions, 1 deletions
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(), |