From 05204ed4699f983887db85416dba9a387b1c235a Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Mon, 9 Dec 2019 14:48:56 -0500 Subject: Add linting to project using Eslint --- src/util/logger.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/util/logger.ts') diff --git a/src/util/logger.ts b/src/util/logger.ts index bafb829..d108ae0 100644 --- a/src/util/logger.ts +++ b/src/util/logger.ts @@ -1,4 +1,6 @@ import winston from "winston"; +import { Format } from "logform"; +import * as Transport from "winston-transport"; const { combine, splat, timestamp, label, colorize, printf } = winston.format; const { Console } = winston.transports; @@ -7,7 +9,13 @@ const LOG_LEVEL = process.env.LOG_LEVEL || "info"; /** * Provides standard logging format and output for the server. */ -export default (clazz: string, level: string = LOG_LEVEL) => ({ +export default ( + clazz: string, + level: string = LOG_LEVEL +): { + format: Format; + transports: Transport[]; +} => ({ format: combine( splat(), timestamp(), -- cgit