<commit_before>"""Helper method for getting artifactory information."""
from .artifactory import Artifactory


def get_artifactory_info(repo_name=None, repo_type='local'):
    """Get storage info from Artifactory.

    Args:
        repo_name (tuple, optional): Name of artifactory repo.
        repo_type (str): Type of artifactory repo.

    Returns:
         keys (dict, optional): Dictionary of repo data.
         storage_info (dict): Storage information api call.
    """
    artifactory = Artifactory(repo_name=repo_name)
    storage_info = artifactory.list(repo_type=repo_type)

    if repo_name:
        keys = repo_name
    else:
        keys = storage_info.keys()

    return storage_info, keys<commit_msg>Add logging to helper method.<commit_after>"""Helper method for getting artifactory information."""
import logging

from .artifactory import Artifactory


def get_artifactory_info(repo_name=None, repo_type='local'):
    """Get storage info from Artifactory.

    Args:
        repo_name (tuple, optional): Name of artifactory repo.
        repo_type (str): Type of artifactory repo.

    Returns:
         keys (dict, optional): Dictionary of repo data.
         storage_info (dict): Storage information api call.
    """
    artifactory = Artifactory(repo_name=repo_name)
    storage_info = artifactory.list(repo_type=repo_type)

    if repo_name:
        keys = repo_name
    else:
        keys = storage_info.keys()

    logging.debug('Storage info: %s', storage_info)
    logging.debug('Keys: %s', keys)

    return storage_info, keys
{'fraction_non_alphanumeric': 0.09196141479099679, 'fraction_numerical': 0.0, 'mean_word_length': 3.358543417366947, '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': '2639110', 'n_tokens_mistral': 459, 'n_tokens_neox': 447, 'n_words': 132}