import winston from 'winston';
const nangoLogFormat = (service = '') => {
    return winston.format.printf((info) => {
        return `${info['timestamp']} [${info.level.toUpperCase()}]${service ? ` [${service}] ` : ''}${info.message}`;
    });
};
export function getLogger(service) {
    return winston.createLogger({
        levels: winston.config.syslog.levels,
        format: winston.format.combine(winston.format.timestamp(), nangoLogFormat(service)),
        transports: [new winston.transports.Console({ level: process.env['LOG_LEVEL'] || 'info' })]
    });
}
//# sourceMappingURL=logger.js.map