diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2019-12-09 14:48:56 -0500 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2019-12-09 14:48:56 -0500 |
| commit | 05204ed4699f983887db85416dba9a387b1c235a (patch) | |
| tree | fddb3d08ef8c34c89186913db038730ab5946e6c /src/util/logger.ts | |
| parent | d61e599a02bdd9e1c2ba8730d03ebcd33ceed467 (diff) | |
| download | ao-coverage-05204ed4699f983887db85416dba9a387b1c235a.tar.gz ao-coverage-05204ed4699f983887db85416dba9a387b1c235a.tar.bz2 ao-coverage-05204ed4699f983887db85416dba9a387b1c235a.zip | |
Add linting to project using Eslint
Diffstat (limited to 'src/util/logger.ts')
| -rw-r--r-- | src/util/logger.ts | 10 |
1 files changed, 9 insertions, 1 deletions
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(), |
