"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LogLevel = void 0;
exports.getLogger = getLogger;
var logger_1 = require("@slack/logger");
var logger_2 = require("@slack/logger");
Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return logger_2.LogLevel; } });
var instanceCount = 0;
/**
 * INTERNAL interface for getting or creating a named Logger.
 */
function getLogger(name, level, existingLogger) {
    // Get a unique ID for the logger.
    var instanceId = instanceCount;
    instanceCount += 1;
    // Set up the logger.
    var logger = (function () {
        if (existingLogger !== undefined) {
            return existingLogger;
        }
        return new logger_1.ConsoleLogger();
    })();
    logger.setName("".concat(name, ":").concat(instanceId));
    if (level !== undefined) {
        logger.setLevel(level);
    }
    return logger;
}
//# sourceMappingURL=logger.js.map