"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const dynamo_easy_config_1 = require("../config/dynamo-easy-config");
function getLogFn(className, modelConstructor, level) {
    return (message, data) => {
        dynamo_easy_config_1.dynamoEasyConfig.logReceiver({
            className,
            modelConstructor,
            level,
            message,
            data,
            timestamp: Date.now(),
        });
    };
}
function createLogger(className, modelConstructor) {
    return {
        warn: getLogFn(className, modelConstructor.name, 'warning'),
        info: getLogFn(className, modelConstructor.name, 'info'),
        debug: getLogFn(className, modelConstructor.name, 'debug'),
    };
}
exports.createLogger = createLogger;
//# sourceMappingURL=logger.js.map