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

Add ./wpt run --verbose as an alias of --log-mach-level debug #7846

Open
gsnedders opened this issue Oct 16, 2017 · 7 comments · May be fixed by #14619
Open

Add ./wpt run --verbose as an alias of --log-mach-level debug #7846

gsnedders opened this issue Oct 16, 2017 · 7 comments · May be fixed by #14619
Labels
infra priority:backlog wptrunner The automated test runner, commonly called through ./wpt run

Comments

@gsnedders
Copy link
Member

It's a pain that we use something non-standard here and not that memorable.

@gsnedders gsnedders added wptrunner The automated test runner, commonly called through ./wpt run infra labels Oct 16, 2017
@qiuzhong
Copy link
Contributor

If you don't mind, I'll take this issue.

@qiuzhong
Copy link
Contributor

If --verbose as an alias of --log-mach-level debug, here are my thoughts to handle the options:

  • If the command line contains --verbose option only, then according to the alias rule, log_mach_level property is set to be debug.
  • If the command line contains both --verbose and --log-mach-level <whatever level> options (not recommended), then I guess the attention is to set log_mach_level to be the log level value. In such case, --verbose is actually invalid and thus has no impact on the --log-mach-level option.

@gsnedders , what do you think?

@jgraham
Copy link
Contributor

jgraham commented Dec 20, 2018

This won't work if implemented naively. If the logging is set to something other than mach then implying the --mach-log-level argument will just cause an error about mach logging not being enabled.

qiuzhong added a commit to qiuzhong/wpt that referenced this issue Dec 20, 2018
Add a new option `--verbose` to `./wpt run` command line as an alias
of `--log-mach-level debug`.
Fix: web-platform-tests#7846
@gsnedders
Copy link
Member Author

IMO, we should be trying to figure out what the current logger for stdout is (or should we go for all loggers?) and making that level debug.

@qiuzhong
Copy link
Contributor

@gsnedders , do you mean --verbose should support all kinds of log formats (raw, unnitest, xunit, html, tbpl, grouped, errorsummy from the mozlog module code)? My understanding is that besides the mach format, it should also support all these formats. In other word, --verbose option should be the alias of other --log_*_level debug options automatically, not so specific.

Did I misunderstand your intention?

@qiuzhong
Copy link
Contributor

qiuzhong commented Dec 21, 2018

@jgraham, please also make a clarification if I got you wrong.

@jgraham
Copy link
Contributor

jgraham commented Dec 21, 2018

Yeah, I think you need to find a way to figure out which is going to be the stdout logger and set whatever option is required to make that verbose if it exists. This is probably better done in mozlog itself in https://searchfox.org/mozilla-central/source/testing/mozbase/mozlog/mozlog/commandline.py Note that file has an existing concept of verbose, which I think is different.

qiuzhong added a commit to qiuzhong/wpt that referenced this issue Dec 29, 2018
Add a new option `--verbose` to `./wpt run` command line as an alias
of `--log-mach-level debug`.
Fix: web-platform-tests#7846
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra priority:backlog wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants