def update_sanic_log_level(log_file: Optional[Text]=None):
    "Set the log level of sanic loggers to the log level specified in the environment\n    variable 'LOG_LEVEL_LIBRARIES'."
    from sanic.log import logger, error_logger, access_logger
    log_level = os.environ.get(ENV_LOG_LEVEL_LIBRARIES, DEFAULT_LOG_LEVEL_LIBRARIES)
    logger.setLevel(log_level)
    error_logger.setLevel(log_level)
    access_logger.setLevel(log_level)
    logger.propagate = False
    error_logger.propagate = False
    access_logger.propagate = False
    if (log_file is not None):
        formatter = logging.Formatter('%(asctime)s [%(levelname)-5.5s]  %(message)s')
        file_handler = logging.FileHandler(log_file)
        file_handler.setFormatter(formatter)
        logger.addHandler(file_handler)
        error_logger.addHandler(file_handler)
        access_logger.addHandler(file_handler)
Set the log level of sanic loggers to the log level specified in the environment
variable 'LOG_LEVEL_LIBRARIES'.
def update_sanic_log_level(log_file: Optional[Text]=None):
    "Set the log level of sanic loggers to the log level specified in the environment\n    variable 'LOG_LEVEL_LIBRARIES'."
    from sanic.log import logger, error_logger, access_logger
    log_level = os.environ.get(ENV_LOG_LEVEL_LIBRARIES, DEFAULT_LOG_LEVEL_LIBRARIES)
    logger.setLevel(log_level)
    error_logger.setLevel(log_level)
    access_logger.setLevel(log_level)
    logger.propagate = False
    error_logger.propagate = False
    access_logger.propagate = False
    if (log_file is not None):
        formatter = logging.Formatter('%(asctime)s [%(levelname)-5.5s]  %(message)s')
        file_handler = logging.FileHandler(log_file)
        file_handler.setFormatter(formatter)
        logger.addHandler(file_handler)
        error_logger.addHandler(file_handler)
        access_logger.addHandler(file_handler)