"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLogger = void 0;
const dx_logger_1 = require("./dx-logger");
const structured_logger_1 = require("./structured-logger");
const pino_1 = __importDefault(require("pino"));
const quiet_logger_1 = require("./quiet-logger");
function getLogger(type, logger = (0, pino_1.default)({ level: process.env.LOG_LEVEL || "trace" })) {
    if (!type) {
        return undefined;
    }
    if (typeof type !== "string") {
        return type;
    }
    switch (type) {
        case "none":
            return undefined;
        case "dx":
            return new dx_logger_1.DxLogger();
        case "structured":
            return new structured_logger_1.StructuredLogger(logger);
        case "quiet":
            return new quiet_logger_1.QuietLogger();
    }
}
exports.getLogger = getLogger;
//# sourceMappingURL=logger.js.map