def configure_logger(path: pathlib.Path, verbose: bool=False) -> logging.Logger:
    'Configure logger\n\n    Args:\n        path (pathlib.Path): Path where the persistent logger should write to.\n        verbose (bool, optional): Use verbose logging. Defaults to False.\n\n    Returns:\n        logging.Logger: Created logger\n    '
    path.parent.mkdir(parents=True, exist_ok=True)
    logger = logging.getLogger()
    logger.setLevel(logging.INFO)
    log_file_formatter = logging.Formatter('%(asctime)s %(threadName)s %(levelname)s %(name)s %(message)s')
    if verbose:
        log_console_formatter = logging.Formatter('[c8ylp]  %(levelname)-5s %(message)s')
        console_loglevel = logging.INFO
        if (len(logger.handlers) == 0):
            console_handler = logging.StreamHandler()
            console_handler.setFormatter(log_console_formatter)
            console_handler.setLevel(console_loglevel)
            logger.addHandler(console_handler)
        else:
            handler = logger.handlers[0]
            handler.setLevel(console_loglevel)
            handler.setFormatter(log_console_formatter)
    else:
        logger.handlers = []
    rotate_handler = RotatingFileHandler(filename=str(path), maxBytes=10000000, backupCount=5)
    rotate_handler.setFormatter(log_file_formatter)
    rotate_handler.setLevel(logging.INFO)
    logger.addHandler(rotate_handler)
    return logger
Configure logger

Args:
    path (pathlib.Path): Path where the persistent logger should write to.
    verbose (bool, optional): Use verbose logging. Defaults to False.

Returns:
    logging.Logger: Created logger
def configure_logger(path: pathlib.Path, verbose: bool=False) -> logging.Logger:
    'Configure logger\n\n    Args:\n        path (pathlib.Path): Path where the persistent logger should write to.\n        verbose (bool, optional): Use verbose logging. Defaults to False.\n\n    Returns:\n        logging.Logger: Created logger\n    '
    path.parent.mkdir(parents=True, exist_ok=True)
    logger = logging.getLogger()
    logger.setLevel(logging.INFO)
    log_file_formatter = logging.Formatter('%(asctime)s %(threadName)s %(levelname)s %(name)s %(message)s')
    if verbose:
        log_console_formatter = logging.Formatter('[c8ylp]  %(levelname)-5s %(message)s')
        console_loglevel = logging.INFO
        if (len(logger.handlers) == 0):
            console_handler = logging.StreamHandler()
            console_handler.setFormatter(log_console_formatter)
            console_handler.setLevel(console_loglevel)
            logger.addHandler(console_handler)
        else:
            handler = logger.handlers[0]
            handler.setLevel(console_loglevel)
            handler.setFormatter(log_console_formatter)
    else:
        logger.handlers = []
    rotate_handler = RotatingFileHandler(filename=str(path), maxBytes=10000000, backupCount=5)
    rotate_handler.setFormatter(log_file_formatter)
    rotate_handler.setLevel(logging.INFO)
    logger.addHandler(rotate_handler)
    return logger