def log(self, msg, reply=None, min_level=2): if not reply: url = '' else: url = qurl2ascii(reply.url()) if not url: return if self.verbosity >= min_level: msg = msg.format(url=url) log.msg(msg, system='network')
def _urlChanged(self, url): cause_ev = self.web_page.har_log._prev_entry(unicode(url.toString()), -1) if cause_ev: self.history.append(without_private(cause_ev.data)) msg = "mainFrame().urlChanged %s: %s" % (id(self.splash_request), qurl2ascii(url)) self.log(msg, min_level=3) if self._finished_timer is not None: self.log("Cancelling wait timer %s" % (id(self.splash_request))) self._finished_timer.stop() self._finished_timer = None
def log(self, msg, reply=None, min_level=2): if self.verbosity < min_level: return if not reply: url = '' else: url = qurl2ascii(reply.url()) if not url: return msg = msg.format(url=url) log.msg(msg, system='network-manager')
def log(self, msg, reply=None, min_level=2, format_msg=True): if self.verbosity < min_level: return if not reply: url = '' else: url = qurl2ascii(reply.url()) if not url: return if format_msg: msg = msg.format(url=url) log.msg(msg, system='network-manager')
def on_url_changed(self, url): self.log("mainFrame().urlChanged %s" % qurl2ascii(url))
def _urlChanged(self, url): msg = "mainFrame().urlChanged %s: %s" % (id(self.splash_request), qurl2ascii(url)) self.log(msg, min_level=4)