import { main, newLogger } from "./logger";
const LOGGER_KEY = "ctx-key-logger";
export const withLogger = (ctx, logger) => {
    return Object.assign(Object.assign({}, ctx), { [LOGGER_KEY]: logger });
};
export const getLogger = (ctx) => {
    const l = ctx[LOGGER_KEY];
    if (l == undefined) {
        return main;
    }
    return l;
};
export const withDebugLogger = (ctx) => {
    return withLogger(ctx, newLogger({
        level: "DEBUG",
        name: "DEBUG",
    }));
};
//# sourceMappingURL=context.js.map