Open gsnedders opened 7 years ago
If you don't mind, I'll take this issue.
If --verbose
as an alias of --log-mach-level debug
, here are my thoughts to handle the options:
--verbose
option only, then according to the alias rule, log_mach_level
property is set to be debug
.--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?
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.
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.
@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?
@jgraham, please also make a clarification if I got you wrong.
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.
It's a pain that we use something non-standard here and not that memorable.