This commit is contained in:
Bowden 2018-03-12 09:43:29 -07:00
Родитель 2c8f46188a
Коммит cf1a5bf748
2 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -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"})

Просмотреть файл

@ -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");