Bug 1522604 - I created the new logger - RaptorLogger.py draft
authorpulselistener
Mon, 27 May 2019 13:47:28 +0000
changeset 2026404 06c8c03b3c73039a1862041341129f680cfd7939
parent 2026403 77fc8cd4b5c490cc752706e02c05aad8bf5e3491
child 2026405 c79c20d3cb8f790676e0809b275dfc41cb78e1a3
push id368007
push userreviewbot
push dateMon, 27 May 2019 13:48:24 +0000
treeherdertry@85c747a337ca [default view] [failures only]
bugs1522604
milestone68.0a1
Bug 1522604 - I created the new logger - RaptorLogger.py Differential Revision: https://phabricator.services.mozilla.com/D32007 Differential Diff: PHID-DIFF-ulvlz6eakfcdj5f6ipwo
testing/raptor/raptor/RaptorLogger.py
new file mode 100644
--- /dev/null
+++ b/testing/raptor/raptor/RaptorLogger.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from __future__ import absolute_import
+
+from mozlog import ProxyLogger
+
+
+class RaptorLogger(ProxyLogger):
+
+    def __init__(self, component=None):
+        self.component = component
+        self.logger = ProxyLogger(self.component)
+
+    def exception(self, message):
+        self.critical(message)
+
+    def debug(self, message):
+        return self.logger.debug("Debug: {}".format(message))
+
+    def info(self, message):
+        return self.logger.info("Info: {}".format(message))
+
+    def warning(self, message):
+        return self.logger.warning("Warning: {}".format(message))
+
+    def error(self, message):
+        return self.logger.error("Error: {}".format(message))
+
+    def critical(self, message):
+        return self.logger.critical("Critical: {}".format(message))
+
+    def log_raw(self, message):
+        return self.logger.log_raw(message)
+
+    def process_output(self, *args, **kwargs):
+        return self.logger.process_output(*args, **kwargs)