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

Unified Diff: Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/logger.py

Issue 1154373005: Introduce WPTServe for running W3C Blink Layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add executable bit to pass permchecks. Created 5 years, 6 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
Index: Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/logger.py
diff --git a/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/logger.py b/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/logger.py
new file mode 100644
index 0000000000000000000000000000000000000000..6c91492c7e9a9d752be40c474d51245975f6b1ff
--- /dev/null
+++ b/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/logger.py
@@ -0,0 +1,29 @@
+class NoOpLogger(object):
+ def critical(self, msg):
+ pass
+
+ def error(self, msg):
+ pass
+
+ def info(self, msg):
+ pass
+
+ def warning(self, msg):
+ pass
+
+ def debug(self, msg):
+ pass
+
+logger = NoOpLogger()
+_set_logger = False
+
+def set_logger(new_logger):
+ global _set_logger
+ if _set_logger:
+ raise Exception("Logger must be set at most once")
+ global logger
+ logger = new_logger
+ _set_logger = True
+
+def get_logger():
+ return logger

Powered by Google App Engine
This is Rietveld 408576698