<commit_before>import winston = require('winston');

import TransportInstance = winston.TransportInstance;
import LoggerInstance = winston.LoggerInstance;

class Logger {

  private logger: LoggerInstance;
  public info: any;
  public warn: any;
  public error: any;
  public debug: any;

  constructor() {
    let transports = this.createTransports();
    this.logger = new (winston.Logger)({transports: transports});
    this.info = this.logger.info;
    this.warn = this.logger.warn;
    this.error = this.logger.error;
    this.debug = this.logger.debug;
  }

  private createTransports(): Array<TransportInstance> {
    let consoleLogLevel = 'info';
    let transports = [];
    // noinspection JSUnusedGlobalSymbols
    transports.push(
      new winston.transports.Console({<commit_msg>Console log level can now be set in the main config<commit_after>import winston = require('winston');

import TransportInstance = winston.TransportInstance;
import LoggerInstance = winston.LoggerInstance;
import { mainConfig } from './config.service';

class Logger {

  private logger: LoggerInstance;
  public info: any;
  public warn: any;
  public error: any;
  public debug: any;

  constructor() {
    let transports = this.createTransports();
    this.logger = new (winston.Logger)({transports: transports});
    this.info = this.logger.info;
    this.warn = this.logger.warn;
    this.error = this.logger.error;
    this.debug = this.logger.debug;
  }

  private createTransports(): Array<TransportInstance> {
    let consoleLogLevel = mainConfig.get('console_log_level');
    let transports = [];
    // noinspection JSUnusedGlobalSymbols
    transports.push(
      new winston.transports.Console({
{'fraction_non_alphanumeric': 0.11, 'fraction_numerical': 0.0, 'mean_word_length': 3.9882697947214076, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4216032', 'n_tokens_mistral': 499, 'n_tokens_neox': 488, 'n_words': 123}