<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def init_core_logger(location, config):
 """ Initialize the logger with settings from config. """


    logger = logging.getLogger('dagobah')
    formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')

    if get_conf(config, 'Logging.Core.enabled', False) == False:
        logger.addHandler(NullHandler())
        return

    config_filepath = get_conf(config, 'Logging.Core.logfile', 'default')
    if config_filepath == 'default':
        config_filepath = os.path.join(location, 'dagobah.log')
    config_filepath = os.path.expanduser(config_filepath) if config_filepath else None

    level_string = get_conf(config, 'Logging.Core.loglevel', 'info').upper()
    numeric_level = getattr(logging, level_string, None)

    basic_config_kwargs = {'level': numeric_level,
                           'format': '%(asctime)s - %(name)s - %(levelname)s - %(message)s'}
    if config_filepath:
        basic_config_kwargs['filename'] = config_filepath
    else:
        basic_config_kwargs['stream'] = open(os.devnull, 'w')
    logging.basicConfig(**basic_config_kwargs)

    if get_conf(config, 'Logging.Core.log_to_stdout'):
        root = logging.getLogger()
        stdout_logger = logging.StreamHandler(sys.stdout)
        stdout_logger.setLevel(logging.DEBUG)
        stdout_logger.setFormatter(formatter)
        root.addHandler(stdout_logger)

    if config_filepath:
        print 'Logging output to %s' % config_filepath
    logging.info('Core logger initialized at level %s' % level_string)