diff --git a/src/util/logger.ts b/src/util/logger.ts index 4004e6e..cb052af 100644 --- a/src/util/logger.ts +++ b/src/util/logger.ts @@ -1,7 +1,8 @@ -import * as winston from "winston"; +import winston from "winston"; +import { Logger } from "winston"; import { ENVIRONMENT } from "./secrets"; -const logger = new (winston.Logger)({ +const logger = new (Logger)({ transports: [ new (winston.transports.Console)({ level: process.env.NODE_ENV === "production" ? "error" : "debug" }), new (winston.transports.File)({ filename: "debug.log", level: "debug"}) diff --git a/src/util/secrets.ts b/src/util/secrets.ts index bc6d27a..4fbf6b5 100644 --- a/src/util/secrets.ts +++ b/src/util/secrets.ts @@ -1,6 +1,6 @@ import logger from "./logger"; -import * as dotenv from "dotenv"; -import * as fs from "fs"; +import dotenv from "dotenv"; +import fs from "fs"; if (fs.existsSync(".env")) { logger.debug("Using .env file to supply config environment variables");