<commit_before>Space.Module.define('Space.logging.Winston', {

  dependencies: {
    configuration: 'configuration',
    log: 'Space.Logger'
  },

  onInitialize() {
    const log = this.injector.get('log');
    const transports = lodash.get(this.configuration, 'log.winston.transports', [
      this._setupWinstonConsoleTransport()
    ]);
    const adapter = new Space.Logger.WinstonAdapter(transports);
    this.injector.map('Space.Logger.WinstonAdapter').toStaticValue(adapter);
    log.addAdapter('winston', adapter);
  },

  _setupWinstonConsoleTransport() {
    const options = {
      colorize: true,
      prettyPrint: true,
      level: 'info'
    };
    return Space.Logger.WinstonAdapter.console(options);
  }
});<commit_msg>Fixes issue with default transport not beeing properly set<commit_after>Space.Module.define('Space.logging.Winston', {

  dependencies: {
    configuration: 'configuration',
    log: 'Space.Logger'
  },

  onInitialize() {
    const log = this.injector.get('log');
    let transports = lodash.get(this.configuration, 'log.winston.transports', []);
    if (lodash.isEmpty(transports)) {
      transports = [this._setupWinstonConsoleTransport()]
    }

    const adapter = new Space.Logger.WinstonAdapter(transports);
    this.injector.map('Space.Logger.WinstonAdapter').toStaticValue(adapter);
    log.addAdapter('winston', adapter);
  },

  _setupWinstonConsoleTransport() {
    const options = {
      colorize: true,
      prettyPrint: true,
      level: 'info'
    };
    return Space.Logger.WinstonAdapter.console(options);
  }
});
{'fraction_non_alphanumeric': 0.13740458015267176, 'fraction_numerical': 0.0, 'mean_word_length': 3.7957317073170733, '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': '4085429', 'n_tokens_mistral': 491, 'n_tokens_neox': 469, 'n_words': 77}