<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def log_filter_url(self, url_data, do_print):
 """Update accounting data and determine if URL should be included in the sitemap. """

        self.stats.log_url(url_data, do_print)
        if self.disabled:
            return
        # initialize prefix and priority
        if self.prefix is None:
            if not url_data.url.startswith(HTTP_SCHEMES):
                log.warn(LOG_CHECK, "Sitemap URL %r does not start with http: or https:.", url_data.url)
                self.disabled = True
                return
            self.prefix = url_data.url
            # first URL (ie. the homepage) gets priority 1.0 per default
            priority = 1.0
        elif url_data.url == self.prefix:
            return
        else:
            # all other pages get priority 0.5 per default
            priority = 0.5
        if self.priority is not None:
            priority = self.priority
         # ignore the do_print flag and determine ourselves if we filter the url
        if (url_data.valid
            and url_data.url.startswith(HTTP_SCHEMES)
            and url_data.url.startswith(self.prefix)
            and url_data.content_type in HTML_TYPES):
            self.log_url(url_data, priority=priority)