# Path: abtools/log.py
# def setup_logging(logfile, print_log_location=True, debug=False):
# def get_logger(name=None):
# def add_stream_handler(logger):
# def make_dir(d):


import logging
import platform
import os
import subprocess as sp
        import urllib
        import urllib
    import pymongo
from pymongo import MongoClient
from abtools import log
        from abtools.utils.pipeline import list_files
        field (str): Name of the padding field. Default is ``padding``
    '''
    unset(db, collection, field=field)
    # c = db[collection]
    # c.update({}, {'$unset': {field: ''}}, multi=True)


def _get_import_collections(jsons, delim, delim_occurance,
                            delim1, delim1_occurance,
                            delim2, delim2_occurance):
    jnames = [os.path.basename(j) for j in jsons]
    if not all([delim1, delim2]):
        collections = [delim.join(j.split(delim)[:delim_occurance]) for j in jnames]
    else:
        pre_colls = [delim1.join(j.split(delim1)[delim1_occurance:]) for j in jnames]
        collections = [delim2.join(j.split(delim2)[:delim2_occurance]) for j in pre_colls]
    return collections


def _print_mongoimport_info(logger):
    logger.info('')
    logger.info('')
    logger.info('')
    logger.info('-' * 25)
    logger.info('MONGOIMPORT')
    logger.info('-' * 25)
    logger.info('')


def _print_remove_padding():

# Path: abtools/log.py
# def setup_logging(logfile, print_log_location=True, debug=False):
# def get_logger(name=None):
# def add_stream_handler(logger):
# def make_dir(d):


# Path: abtools/mongodb.py
import logging
import platform
import os
import subprocess as sp
        import urllib
        import urllib
    import pymongo
from pymongo import MongoClient
from abtools import log
        from abtools.utils.pipeline import list_files

        field (str): Name of the padding field. Default is ``padding``
    '''
    unset(db, collection, field=field)
    # c = db[collection]
    # c.update({}, {'$unset': {field: ''}}, multi=True)


def _get_import_collections(jsons, delim, delim_occurance,
                            delim1, delim1_occurance,
                            delim2, delim2_occurance):
    jnames = [os.path.basename(j) for j in jsons]
    if not all([delim1, delim2]):
        collections = [delim.join(j.split(delim)[:delim_occurance]) for j in jnames]
    else:
        pre_colls = [delim1.join(j.split(delim1)[delim1_occurance:]) for j in jnames]
        collections = [delim2.join(j.split(delim2)[:delim2_occurance]) for j in pre_colls]
    return collections


def _print_mongoimport_info(logger):
    logger.info('')
    logger.info('')
    logger.info('')
    logger.info('-' * 25)
    logger.info('MONGOIMPORT')
    logger.info('-' * 25)
    logger.info('')


def _print_remove_padding():

    logger = log.get_logger('mongodb')