Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(761)

Side by Side Diff: build/android/pylib/android/logdog_logcat_monitor.py

Issue 2622693003: Change the logging of NotBootstrappedError. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import logging 6 import logging
7 import sys 7 import sys
8 8
9 from devil.android import logcat_monitor 9 from devil.android import logcat_monitor
10 from devil.utils import reraiser_thread 10 from devil.utils import reraiser_thread
(...skipping 11 matching lines...) Expand all
22 super(LogdogLogcatMonitor, self).__init__(adb, clear, filter_specs) 22 super(LogdogLogcatMonitor, self).__init__(adb, clear, filter_specs)
23 self._logcat_url = '' 23 self._logcat_url = ''
24 self._logdog_stream = None 24 self._logdog_stream = None
25 self._stream_client = None 25 self._stream_client = None
26 self._stream_name = stream_name 26 self._stream_name = stream_name
27 try: 27 try:
28 self._stream_client = bootstrap.ButlerBootstrap.probe().stream_client() 28 self._stream_client = bootstrap.ButlerBootstrap.probe().stream_client()
29 self._logdog_stream = self._stream_client.open_text(self._stream_name) 29 self._logdog_stream = self._stream_client.open_text(self._stream_name)
30 except bootstrap.NotBootstrappedError as e: 30 except bootstrap.NotBootstrappedError as e:
31 logging.exception( 31 logging.exception(
32 'Error not bootstrapped. Failed to start logdog: %s', e) 32 'Unable to enable logdog_logcat, %s.', str(e).split(': ')[1])
jbudorick 2017/01/10 01:02:42 I'm not sure that we ought to be messing with the
33 except (KeyError, ValueError) as e: 33 except (KeyError, ValueError) as e:
34 logging.exception('Error when creating stream_client/stream: %s.', e) 34 logging.exception('Error when creating stream_client/stream: %s.', e)
35 except Exception as e: # pylint: disable=broad-except 35 except Exception as e: # pylint: disable=broad-except
36 logging.exception('Unknown Error: %s.', e) 36 logging.exception('Unknown Error: %s.', e)
37 37
38 def GetLogcatURL(self): 38 def GetLogcatURL(self):
39 """Return logcat url. 39 """Return logcat url.
40 40
41 The default logcat url is '', if failed to create stream_client. 41 The default logcat url is '', if failed to create stream_client.
42 """ 42 """
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 self._record_thread = reraiser_thread.ReraiserThread(record_to_stream) 86 self._record_thread = reraiser_thread.ReraiserThread(record_to_stream)
87 self._record_thread.start() 87 self._record_thread.start()
88 88
89 def Close(self): 89 def Close(self):
90 """Override parent's close method.""" 90 """Override parent's close method."""
91 pass 91 pass
92 92
93 def __del__(self): 93 def __del__(self):
94 """Override parent's delete method.""" 94 """Override parent's delete method."""
95 pass 95 pass
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698