Title: [232214] trunk/Tools
Revision
232214
Author
[email protected]
Date
2018-05-25 16:41:19 -0700 (Fri, 25 May 2018)

Log Message

test-webkitpy messages logged using __main__ logger are not displayed
https://bugs.webkit.org/show_bug.cgi?id=185823

Rubber-stamped by Aakash Jain.

Configure the logger for __main__ so that messages that are logged before it parses its
command line arguments are printed to standard error.

Currently test-webkitpy creates a named logger (__main__) for its logging. However it does
not configure a stream to use for printing until after it parses its command line arguments
via webkitpy.test.printer.Printer.configure(). Messages logged until then are never written
to the console. We explicitly configure the __main__ logger instead of calling webkitpy.test.printer.Printer.configure()
earlier because the latter both configures a stream and filters logged messages based on
the specified verbosity. Logged messaged from code in __main__ should not be subject to
such filtering. So, we explicitly configure the __main__ logger.

* Scripts/webkitpy/test/main.py:
(main):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (232213 => 232214)


--- trunk/Tools/ChangeLog	2018-05-25 23:27:02 UTC (rev 232213)
+++ trunk/Tools/ChangeLog	2018-05-25 23:41:19 UTC (rev 232214)
@@ -1,3 +1,24 @@
+2018-05-25  Daniel Bates  <[email protected]>
+
+        test-webkitpy messages logged using __main__ logger are not displayed
+        https://bugs.webkit.org/show_bug.cgi?id=185823
+
+        Rubber-stamped by Aakash Jain.
+
+        Configure the logger for __main__ so that messages that are logged before it parses its
+        command line arguments are printed to standard error.
+
+        Currently test-webkitpy creates a named logger (__main__) for its logging. However it does
+        not configure a stream to use for printing until after it parses its command line arguments
+        via webkitpy.test.printer.Printer.configure(). Messages logged until then are never written
+        to the console. We explicitly configure the __main__ logger instead of calling webkitpy.test.printer.Printer.configure()
+        earlier because the latter both configures a stream and filters logged messages based on
+        the specified verbosity. Logged messaged from code in __main__ should not be subject to
+        such filtering. So, we explicitly configure the __main__ logger.
+
+        * Scripts/webkitpy/test/main.py:
+        (main):
+
 2018-05-25  Saam Barati  <[email protected]>
 
         Make JSC have a mini mode that kicks in when the JIT is disabled

Modified: trunk/Tools/Scripts/webkitpy/test/main.py (232213 => 232214)


--- trunk/Tools/Scripts/webkitpy/test/main.py	2018-05-25 23:27:02 UTC (rev 232213)
+++ trunk/Tools/Scripts/webkitpy/test/main.py	2018-05-25 23:41:19 UTC (rev 232214)
@@ -36,6 +36,7 @@
 import traceback
 import unittest
 
+from webkitpy.common.system.logutils import configure_logging
 from webkitpy.common.system.filesystem import FileSystem
 from webkitpy.test.finder import Finder
 from webkitpy.test.printer import Printer
@@ -45,6 +46,8 @@
 
 
 def main():
+    configure_logging(logger=_log)
+
     up = os.path.dirname
     webkit_root = up(up(up(up(up(os.path.abspath(__file__))))))
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to