Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up check_stability logging at root level #7768

Closed

Conversation

lukebjerring
Copy link
Contributor

@lukebjerring lukebjerring commented Oct 13, 2017

When the command git fetch https://github.com/w3c/web-platform-tests.git master:master fails (because of local branch state), logging is attempted (with the default/root logger), which is not set up. This causes the output to be:

No handlers could be found for logger "root"

instead of something like

ERROR: [...]/web-platform-tests: Git command exited with status 1

cc/ @jgraham


This change is Reviewable

@w3c-bots
Copy link

w3c-bots commented Oct 13, 2017

Build PASSED

Started: 2017-10-19 15:11:31
Finished: 2017-10-19 15:35:18

View more information about this build on:

handler = logging.StreamHandler(sys.stdout)
formatter = logging.Formatter(logging.BASIC_FORMAT, None)
handler.setFormatter(formatter)
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
logger.propagate = False
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure about this - Added to avoid dup'd messages if someone sets up root-level debugging elsewhere

@@ -10,7 +10,7 @@
here = os.path.dirname(__file__)
wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir))

logger = logging.getLogger()
logger = logging.getLogger(wpt_root)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that in testfiles (where the lack of root-logging setup was the issue) and check_stability are both changed to wpt_root dir logging.

@lukebjerring lukebjerring force-pushed the basic-logging branch 2 times, most recently from fc67efa to ae9cbe9 Compare October 19, 2017 14:57
@jgraham
Copy link
Contributor

jgraham commented Oct 20, 2017

So, I might have fixed this in the wpt tool with another change that I made recently. Can you verify that the problem still exists on current master?

@lukebjerring
Copy link
Contributor Author

Yep, unable to repro the problem anymore - closing.

@lukebjerring lukebjerring deleted the basic-logging branch October 20, 2017 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants