"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const winston_1 = require("winston");
const GraylogTransport_1 = require("./GraylogTransport");
const transportOptions_1 = require("./transportOptions");
const fs_extra_1 = require("fs-extra");
const path_1 = require("path");
const logFileFolder = path_1.resolve(process.cwd(), '.ewizard');
const logger = winston_1.createLogger({
    level: 'debug',
    transports: [
        new winston_1.transports.Console(transportOptions_1.consoleOptions),
    ],
});
if (fs_extra_1.pathExistsSync(logFileFolder)) {
    logger.add(new winston_1.transports.File(transportOptions_1.fileOptions));
}
if (process.env.NODE_ENV !== 'test') {
    logger.add(new GraylogTransport_1.default(transportOptions_1.graylogOptions));
}
winston_1.add(logger);
exports.default = logger;
//# sourceMappingURL=index.js.map