LOGGING_CONFIG = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'basic': {
            'format': '%(asctime)s [%(process)5d] (%(name)s) %(levelname)s - %(message)s',
        },
        'sparse': {
            'format': '%(message)s',
        },
    },
    'handlers': {
        'logfile': {
            'class': 'logging.handlers.TimedRotatingFileHandler',
            'filename': 'PLACEHOLDER',
            'when': 'W6',
            'backupCount': 26,
            'level': 'DEBUG',
            'formatter': 'basic',
        },
        'console': {
            'class': 'logging.StreamHandler',
            'level': 'DEBUG',
            'formatter': 'sparse',
            'stream': 'ext://sys.stdout',
        },
    },
    'root': {
        # most verbose here, let handlers be the filters
        'level': 'DEBUG',
        'handlers': ['logfile', 'console'],
    },
}


def logging_config(logfile_path, logfile_level='debug', console_level='debug'):
    """Returns a copy of the logging configuration dict with the args set."""
    cfg = dict(LOGGING_CONFIG)
    cfg['handlers']['logfile']['filename'] = logfile_path
    cfg['handlers']['logfile']['level'] = logfile_level.upper()
    cfg['handlers']['console']['level'] = console_level.upper()
    return cfg

08d98f5f60aa54070e9d67a26c0cea5f2075c075
<mask token>

<mask token>


def logging_config(logfile_path, logfile_level='debug', console_level='debug'):
    """Returns a copy of the logging configuration dict with the args set."""
    cfg = dict(LOGGING_CONFIG)
    cfg['handlers']['logfile']['filename'] = logfile_path
    cfg['handlers']['logfile']['level'] = logfile_level.upper()
    cfg['handlers']['console']['level'] = console_level.upper()
    return cfg

LOGGING_CONFIG = {'version': 1, 'disable_existing_loggers': False,
    'formatters': {'basic': {'format':
    '%(asctime)s [%(process)5d] (%(name)s) %(levelname)s - %(message)s'},
    'sparse': {'format': '%(message)s'}}, 'handlers': {'logfile': {'class':
    'logging.handlers.TimedRotatingFileHandler', 'filename': 'PLACEHOLDER',
    'when': 'W6', 'backupCount': 26, 'level': 'DEBUG', 'formatter': 'basic'
    }, 'console': {'class': 'logging.StreamHandler', 'level': 'DEBUG',
    'formatter': 'sparse', 'stream': 'ext://sys.stdout'}}, 'root': {'level':
    'DEBUG', 'handlers': ['logfile', 'console']}}


def logging_config(logfile_path, logfile_level='debug', console_level='debug'):
    """Returns a copy of the logging configuration dict with the args set."""
    cfg = dict(LOGGING_CONFIG)
    cfg['handlers']['logfile']['filename'] = logfile_path
    cfg['handlers']['logfile']['level'] = logfile_level.upper()
    cfg['handlers']['console']['level'] = console_level.upper()
    return cfg

LOGGING_CONFIG = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'basic': {
            'format': '%(asctime)s [%(process)5d] (%(name)s) %(levelname)s - %(message)s',
        },
        'sparse': {
            'format': '%(message)s',
        },
    },
    'handlers': {
        'logfile': {
            'class': 'logging.handlers.TimedRotatingFileHandler',
            'filename': 'PLACEHOLDER',
            'when': 'W6',
            'backupCount': 26,
            'level': 'DEBUG',
            'formatter': 'basic',
        },
        'console': {
            'class': 'logging.StreamHandler',
            'level': 'DEBUG',
            'formatter': 'sparse',
            'stream': 'ext://sys.stdout',
        },
    },
    'root': {
        # most verbose here, let handlers be the filters
        'level': 'DEBUG',
        'handlers': ['logfile', 'console'],
    },
}


def logging_config(logfile_path, logfile_level='debug', console_level='debug'):
    """Returns a copy of the logging configuration dict with the args set."""
    cfg = dict(LOGGING_CONFIG)
    cfg['handlers']['logfile']['filename'] = logfile_path
    cfg['handlers']['logfile']['level'] = logfile_level.upper()
    cfg['handlers']['console']['level'] = console_level.upper()
    return cfg
