Commit d3db1775 authored by tonyg's avatar tonyg Committed by Commit bot

[Telemetry] Clean up log output a bit.

BUG=

Review URL: https://codereview.chromium.org/512943002

Cr-Commit-Position: refs/heads/master@{#292310}
parent 5e61edc4
...@@ -239,7 +239,7 @@ class InspectorBackend(inspector_websocket.InspectorWebsocket): ...@@ -239,7 +239,7 @@ class InspectorBackend(inspector_websocket.InspectorWebsocket):
import traceback import traceback
traceback.print_exc() traceback.print_exc()
else: else:
logging.debug('Unhandled inspector message: %s', res) logging.warn('Unhandled inspector message: %s', res)
def _HandleError(self, elapsed_time): def _HandleError(self, elapsed_time):
if self._IsInspectable(): if self._IsInspectable():
......
# Copyright 2013 The Chromium Authors. All rights reserved. # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import json
import logging
class InspectorConsole(object): class InspectorConsole(object):
...@@ -17,7 +15,6 @@ class InspectorConsole(object): ...@@ -17,7 +15,6 @@ class InspectorConsole(object):
self._console_enabled = False self._console_enabled = False
def _OnNotification(self, msg): def _OnNotification(self, msg):
logging.debug('Notification: %s', json.dumps(msg, indent=2))
if msg['method'] == 'Console.messageAdded': if msg['method'] == 'Console.messageAdded':
if msg['params']['message']['url'] == 'chrome://newtab/': if msg['params']['message']['url'] == 'chrome://newtab/':
return return
......
# Copyright 2013 The Chromium Authors. All rights reserved. # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import json
import logging
import sys import sys
import time import time
...@@ -26,7 +24,6 @@ class InspectorPage(object): ...@@ -26,7 +24,6 @@ class InspectorPage(object):
self._EnablePageNotifications(timeout=timeout) self._EnablePageNotifications(timeout=timeout)
def _OnNotification(self, msg): def _OnNotification(self, msg):
logging.debug('Notification: %s', json.dumps(msg, indent=2))
if msg['method'] == 'Page.frameNavigated': if msg['method'] == 'Page.frameNavigated':
url = msg['params']['frame']['url'] url = msg['params']['frame']['url']
if not self._navigated_frame_ids == None: if not self._navigated_frame_ids == None:
......
...@@ -57,7 +57,8 @@ class InspectorWebsocket(object): ...@@ -57,7 +57,8 @@ class InspectorWebsocket(object):
self._next_request_id += 1 self._next_request_id += 1
data = json.dumps(req) data = json.dumps(req)
self._socket.send(data) self._socket.send(data)
logging.debug('sent [%s]', data) if logging.getLogger().isEnabledFor(logging.DEBUG):
logging.debug('sent [%s]', json.dumps(req, indent=2, sort_keys=True))
def SyncRequest(self, req, timeout=10): def SyncRequest(self, req, timeout=10):
self.SendAndIgnoreResponse(req) self.SendAndIgnoreResponse(req)
...@@ -103,7 +104,8 @@ class InspectorWebsocket(object): ...@@ -103,7 +104,8 @@ class InspectorWebsocket(object):
while self._socket: while self._socket:
data = self._socket.recv() data = self._socket.recv()
res = json.loads(data) res = json.loads(data)
logging.debug('got [%s]', data) if logging.getLogger().isEnabledFor(logging.DEBUG):
logging.debug('got [%s]', json.dumps(res, indent=2, sort_keys=True))
if 'method' in res and self._notification_handler(res): if 'method' in res and self._notification_handler(res):
return None return None
return res return res
......
...@@ -512,8 +512,6 @@ def _RunPage(test, page, state, expectation, results): ...@@ -512,8 +512,6 @@ def _RunPage(test, page, state, expectation, results):
results.AddValue(skip.SkipValue(page, 'Skipped by test expectations')) results.AddValue(skip.SkipValue(page, 'Skipped by test expectations'))
return return
logging.info('Running %s', page.url)
page_state = PageState(page, test.TabForPage(page, state.browser)) page_state = PageState(page, test.TabForPage(page, state.browser))
def ProcessError(): def ProcessError():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment