aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/parse-log.ts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/parse-log.ts')
-rwxr-xr-xscripts/parse-log.ts7
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 @@
1import * as program from 'commander'
1import { createReadStream } from 'fs' 2import { createReadStream } from 'fs'
2import { join } from 'path' 3import { join } from 'path'
3import { createInterface } from 'readline' 4import { createInterface } from 'readline'
@@ -5,6 +6,10 @@ import * as winston from 'winston'
5import { labelFormatter } from '../server/helpers/logger' 6import { labelFormatter } from '../server/helpers/logger'
6import { CONFIG } from '../server/initializers/constants' 7import { CONFIG } from '../server/initializers/constants'
7 8
9program
10 .option('-l, --level [level]', 'Level log (debug/info/warn/error)')
11 .parse(process.argv)
12
8const excludedKeys = { 13const excludedKeys = {
9 level: true, 14 level: true,
10 message: true, 15 message: true,
@@ -27,7 +32,7 @@ const loggerFormat = winston.format.printf((info) => {
27const logger = new winston.createLogger({ 32const 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(),