mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-24 00:29:53 -05:00
suppress logging of umbraBehaviorFinished() message which is sent a lot
This commit is contained in:
parent
8e44e18053
commit
dd9ef50484
@ -68,7 +68,8 @@ class Behavior:
|
|||||||
self.notify_of_activity()
|
self.notify_of_activity()
|
||||||
|
|
||||||
def is_finished(self):
|
def is_finished(self):
|
||||||
msg_id = self.umbra_worker.send_to_chrome(method="Runtime.evaluate", params={"expression": "umbraBehaviorFinished()"})
|
msg_id = self.umbra_worker.send_to_chrome(method="Runtime.evaluate",
|
||||||
|
suppress_logging=True, params={"expression":"umbraBehaviorFinished()"})
|
||||||
self.waiting_result_msg_ids.append(msg_id)
|
self.waiting_result_msg_ids.append(msg_id)
|
||||||
|
|
||||||
request_idle_timeout_sec = 30
|
request_idle_timeout_sec = 30
|
||||||
|
@ -144,11 +144,12 @@ class Browser:
|
|||||||
|
|
||||||
self._behavior = None
|
self._behavior = None
|
||||||
|
|
||||||
def send_to_chrome(self, **kwargs):
|
def send_to_chrome(self, suppress_logging=False, **kwargs):
|
||||||
msg_id = next(self.command_id)
|
msg_id = next(self.command_id)
|
||||||
kwargs['id'] = msg_id
|
kwargs['id'] = msg_id
|
||||||
msg = json.dumps(kwargs)
|
msg = json.dumps(kwargs)
|
||||||
self.logger.debug('sending message to {}: {}'.format(self._websock, msg))
|
if not suppress_logging:
|
||||||
|
self.logger.debug('sending message to {}: {}'.format(self._websock, msg))
|
||||||
self._websock.send(msg)
|
self._websock.send(msg)
|
||||||
return msg_id
|
return msg_id
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user