Commit 5791d04e authored by Caleb Rouleau's avatar Caleb Rouleau

GPU Integration: hack to make logging provide line number and filename.

Looking at logs right now is slow going without this information.

It seems to work:

https://chromium-swarm.appspot.com/task?id=42c3fb172bd39010&refresh=10&show_raw=1

Bug: chromium:917211
Change-Id: If30ea9075a4275eb7c5aee89521a896d0c82004f
Reviewed-on: https://chromium-review.googlesource.com/c/1450020Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628492}
parent ede28f10
...@@ -70,7 +70,17 @@ class GpuIntegrationTest( ...@@ -70,7 +70,17 @@ class GpuIntegrationTest(
# TODO: remove this once the bug is addressed. # TODO: remove this once the bug is addressed.
if os.name == 'nt': if os.name == 'nt':
browser_options.logging_verbosity = browser_options.VERBOSE_LOGGING browser_options.logging_verbosity = browser_options.VERBOSE_LOGGING
logging.getLogger().setLevel(logging.DEBUG) # Fix up logging to provide filename and line number:
# First need to remove any existing handles so that logging.basicConfig
# works (see
# https://docs.python.org/2/library/logging.html#logging.basicConfig)
root_logger = logging.getLogger()
for handler in root_logger.handlers:
root_logger.removeHandler(handler)
# Now set the basic config so we can find the filename and line number:
FORMAT = "[%(levelname)s:%(filename)s:%(lineno)s] %(message)s"
logging.basicConfig(format=FORMAT)
root_logger.setLevel(logging.DEBUG)
# A non-sandboxed, 15-seconds-delayed gpu process is currently running in # A non-sandboxed, 15-seconds-delayed gpu process is currently running in
# the browser to collect gpu info. A command line switch is added here to # the browser to collect gpu info. A command line switch is added here to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment