def setup(config_root=''):
    """
    Service configuration and logging setup.

    Configuration defined in ``gordon-janitor-user.toml`` will overwrite
    ``gordon-janitor.toml``.

    Args:
        config_root (str): where configuration should load from,
            defaults to current working directory.
    Returns:
        A dict for Gordon service configuration
    """
    config = _load_config(root=config_root)

    logging_config = config.get('core', {}).get('logging', {})
    log_level = logging_config.get('level', 'INFO').upper()
    log_handlers = logging_config.get('handlers') or ['syslog']

    ulogger.setup_logging(
        progname='gordon-janitor', level=log_level, handlers=log_handlers)

    return config