diff --git a/js/src/tests/lib/structuredlog.py b/js/src/tests/lib/structuredlog.py index 0a9104a3c1e9..eec46c0cbd0a 100644 --- a/js/src/tests/lib/structuredlog.py +++ b/js/src/tests/lib/structuredlog.py @@ -1,8 +1,6 @@ # produce mozlog-compatible log messages, following the spec at # https://mozbase.readthedocs.io/en/latest/mozlog.html -from __future__ import print_function - import json import os @@ -16,8 +14,6 @@ class TestLogger(object): 'thread': threadname, 'pid': os.getpid(), } - directory = os.environ.get("MOZ_UPLOAD_DIR", ".") - self.fh = open(os.path.join(directory, threadname + "_raw.log"), "a") def _record(self, **kwargs): record = self.template.copy() @@ -27,7 +23,7 @@ class TestLogger(object): return record def _log_obj(self, obj): - print(json.dumps(obj, sort_keys=True), file=self.fh) + print(json.dumps(obj, sort_keys=True)) def _log(self, **kwargs): self._log_obj(self._record(**kwargs))