{"size": 393, "ext": "js", "max_stars_repo_path": "config/logger.js", "max_stars_repo_name": "Financial-Times/session-user-data-service-kafka-consumer", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "config/logger.js", "max_issues_repo_name": "Financial-Times/session-user-data-service-kafka-consumer", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "config/logger.js", "max_forks_repo_name": "Financial-Times/session-user-data-service-kafka-consumer", "max_forks_repo_forks_event_min_datetime": "2020-07-30T17:02:17.000Z", "max_forks_repo_forks_event_max_datetime": "2020-07-30T17:02:17.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 17.8636363636, "max_line_length": 58, "alphanum_fraction": 0.6615776081}
'use strict';

// External modules
const winston = require('winston');

// Internal modules
const config = require('./config');

const dsn = process.env.SENTRY_DSN;

if (dsn) {

    winston.transports.Sentry = require('winston-sentry');
    winston.add(winston.transports.Sentry, {
        dsn: dsn,
        level: 'error'
    });
}

winston.level = config.logLevel;

module.exports = winston;