<commit_before>from charmhelpers.core import hookenv
from charmhelpers.core import services

from cloudfoundry import tasks
from cloudfoundry.services import SERVICES


def job_manager(service_name):
    hook_name = hookenv.hook_name()
    if hook_name in ('install', 'upgrade-charm'):
        manage_install(service_name)
    else:
        manage_services(service_name)


def manage_install(service_name):
    tasks.install_base_dependencies()


def manage_services(service_name, service_data=SERVICES):
    service_def = tasks.build_service_block(service_name, service_data)
    services.ServiceManager(service_def).manage()
<commit_msg>add basic logging to generated jobs<commit_after>from charmhelpers.core import hookenv
from charmhelpers.core import services

from cloudfoundry import tasks
from cloudfoundry.services import SERVICES
import logging


def job_manager(service_name):
    logging.basicConfig(level=logging.DEBUG)
    hook_name = hookenv.hook_name()
    if hook_name in ('install', 'upgrade-charm'):
        manage_install(service_name)
    else:
        manage_services(service_name)


def manage_install(service_name):
    tasks.install_base_dependencies()


def manage_services(service_name, service_data=SERVICES):
    service_def = tasks.build_service_block(service_name, service_data)
    services.ServiceManager(service_def).manage()

{'fraction_non_alphanumeric': 0.07573529411764705, 'fraction_numerical': 0.0, 'mean_word_length': 5.57487922705314, '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': '5283829', 'n_tokens_mistral': 400, 'n_tokens_neox': 385, 'n_words': 84}