<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_basic_logger(loggername, log_to_file, logpath):
 """ Get a logger with our basic configuration done. :param loggername: Name of logger. :param log_to_file: Boolean, True if this logger should write a file. :return: Logger """

    logger = logging.getLogger(loggername)
    logger.propagate = False
    remove_handlers(logger)
    logger.setLevel(logging.DEBUG)
    logger_config = LOGGING_CONFIG.get(loggername, DEFAULT_LOGGING_CONFIG)
    if TRUNCATE_LOG or logger_config.get("truncate_logs").get("truncate"):
        cfilter = ContextFilter()
        trunc_logs = logger_config.get("truncate_logs")
        # pylint: disable=invalid-name
        cfilter.MAXIMUM_LENGTH = trunc_logs.get("max_len",
                                                DEFAULT_LOGGING_CONFIG.get(
                                                    "truncate_logs").get("max_len"))
        cfilter.REVEAL_LENGTH = trunc_logs.get("reveal_len",
                                               DEFAULT_LOGGING_CONFIG.get(
                                                   "truncate_logs").get("reveal_len"))
        logger.addFilter(cfilter)

    # Filehandler for logger
    if log_to_file:
        _add_filehandler(logger, logpath, name=loggername)

    return logger