<commit_before>import os
import logging
import logging.handlers

import socorro.lib.ConfigurationManager
import socorro.lib.util as sutil
import socorro.lib.JsonDumpStorage as jds

import socorro.collector.collect as collect

#-----------------------------------------------------------------------------------------------------------------
def createPersistentInitialization(configModule):
  storage = {}


  storage["config"] = config = socorro.lib.ConfigurationManager.newConfiguration(configurationModule=configModule,automaticHelp=False)
  storage["collectObject"] = collect.Collect(config)
  storage["hostname"] = os.uname()[1]
  storage["logger"] = logger = logging.getLogger("monitor")

  logger.setLevel(logging.DEBUG)
  rotatingFileLog = logging.handlers.RotatingFileHandler(config.logFilePathname, "a", config.logFileMaximumSize, config.logFileMaximumBackupHistory)
  rotatingFileLog.setLevel(config.logFileErrorLoggingLevel)
  rotatingFileLogFormatter = logging.Formatter(config.logFileLineFormatString)<commit_msg>changed the name of the logger from "monitor" to "collector" - obviously an unadjusted paste job<commit_after>import os
import logging
import logging.handlers

import socorro.lib.ConfigurationManager
import socorro.lib.util as sutil
import socorro.lib.JsonDumpStorage as jds

import socorro.collector.collect as collect

#-----------------------------------------------------------------------------------------------------------------
def createPersistentInitialization(configModule):
  storage = {}

  storage["config"] = config = socorro.lib.ConfigurationManager.newConfiguration(configurationModule=configModule,automaticHelp=False)
  storage["collectObject"] = collect.Collect(config)
  storage["hostname"] = os.uname()[1]
  storage["logger"] = logger = logging.getLogger("collector")

  logger.setLevel(logging.DEBUG)
  rotatingFileLog = logging.handlers.RotatingFileHandler(config.logFilePathname, "a", config.logFileMaximumSize, config.logFileMaximumBackupHistory)
  rotatingFileLog.setLevel(config.logFileErrorLoggingLevel)
  rotatingFileLogFormatter = logging.Formatter(config.logFileLineFormatString)
{'fraction_non_alphanumeric': 0.1903648269410664, 'fraction_numerical': 0.0009354536950420954, 'mean_word_length': 3.795964125560538, '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': '7227096', 'n_tokens_mistral': 549, 'n_tokens_neox': 529, 'n_words': 97}