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):
import traceback
traceback.print_exc()
else:
logging.debug('Unhandled inspector message: %s', res)
logging.warn('Unhandled inspector message: %s', res)
def _HandleError(self, elapsed_time):
if self._IsInspectable():
......
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import logging
class InspectorConsole(object):
......@@ -17,7 +15,6 @@ class InspectorConsole(object):
self._console_enabled = False
def _OnNotification(self, msg):
logging.debug('Notification: %s', json.dumps(msg, indent=2))
if msg['method'] == 'Console.messageAdded':
if msg['params']['message']['url'] == 'chrome://newtab/':
return
......
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import logging
import sys
import time
......@@ -26,7 +24,6 @@ class InspectorPage(object):
self._EnablePageNotifications(timeout=timeout)
def _OnNotification(self, msg):
logging.debug('Notification: %s', json.dumps(msg, indent=2))
if msg['method'] == 'Page.frameNavigated':
url = msg['params']['frame']['url']
if not self._navigated_frame_ids == None:
......
......@@ -57,7 +57,8 @@ class InspectorWebsocket(object):
self._next_request_id += 1
data = json.dumps(req)
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):
self.SendAndIgnoreResponse(req)
......@@ -103,7 +104,8 @@ class InspectorWebsocket(object):
while self._socket:
data = self._socket.recv()
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):
return None
return res
......
......@@ -512,8 +512,6 @@ def _RunPage(test, page, state, expectation, results):
results.AddValue(skip.SkipValue(page, 'Skipped by test expectations'))
return
logging.info('Running %s', page.url)
page_state = PageState(page, test.TabForPage(page, state.browser))
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