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

Unified Diff: telemetry/telemetry/internal/util/ts_proxy_server.py

Issue 3015573002: Add tsproxy logging
Patch Set: Created 3 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | telemetry/telemetry/internal/util/webpagereplay_go_server.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/util/ts_proxy_server.py
diff --git a/telemetry/telemetry/internal/util/ts_proxy_server.py b/telemetry/telemetry/internal/util/ts_proxy_server.py
index b3076dac07621f650261bb69da079874920eead3..583fb5d45f93ddce19e0458f7b819b414700ed36 100644
--- a/telemetry/telemetry/internal/util/ts_proxy_server.py
+++ b/telemetry/telemetry/internal/util/ts_proxy_server.py
@@ -9,6 +9,7 @@ import os
import re
import subprocess
import sys
+import tempfile
from py_utils import atexit_with_log
from telemetry.core import util
@@ -64,6 +65,13 @@ class TsProxyServer(object):
if self._http_port:
cmd_line.append(
'--mapports=443:%s,*:%s' % (self._https_port, self._http_port))
+
+ tf = tempfile.NamedTemporaryFile(delete=False)
+ tf.close()
+ temp_path = tf.name
+ print 'Pipe tsproxy log to %s' % temp_path
+ cmd_line.append('--logfile=%s' % temp_path)
+ cmd_line.append('-vvv')
logging.info('Tsproxy commandline: %r' % cmd_line)
self._proc = subprocess.Popen(
cmd_line, stdout=subprocess.PIPE, stdin=subprocess.PIPE,
« no previous file with comments | « no previous file | telemetry/telemetry/internal/util/webpagereplay_go_server.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698