<commit_before>"use strict";

var winston = require('winston'),
  sentry = require('winston-sentry');;

if(process.env.SENTRY_DSN) {
  new sentry({
    patchGlobal : true
  });
}

module.exports = function(label) {
  var loggers = {
    console : {
      level : 'silly',
      colorize : true,
      prettyPrint : true,
      timestamp : true,
      label : label
    }
  };

  if(process.env.SENTRY_DSN) {
    loggers.sentry = {
      level : 'error',
      dsn   : process.env.SENTRY_DSN
    };
  };

  winston.loggers.add(label, loggers);

  return winston.loggers.get(label);
};<commit_msg>Fixed - use specify dsn when patching uncauch exception handler<commit_after>"use strict";

var winston = require('winston'),
  sentry = require('winston-sentry');

if(process.env.SENTRY_DSN) {
  new sentry({
    patchGlobal : true,
    dsn         : process.env.SENTRY_DSN
  });
}

module.exports = function(label) {
  var loggers = {
    console : {
      level : 'silly',
      colorize : true,
      prettyPrint : true,
      timestamp : true,
      label : label
    }
  };

  if(process.env.SENTRY_DSN) {
    loggers.sentry = {
      level : 'error',
      dsn   : process.env.SENTRY_DSN
    };
  }

  winston.loggers.add(label, loggers);

  return winston.loggers.get(label);
};
{'fraction_non_alphanumeric': 0.13828125, 'fraction_numerical': 0.0, 'mean_word_length': 2.598314606741573, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5459805', 'n_tokens_mistral': 462, 'n_tokens_neox': 452, 'n_words': 84}