Skip to content

Cannot set --debug-level to crit #7165

@macladson

Description

@macladson

Issue

Since merging #6339, we can no longer set --debug-level to crit as tracing does not support the CRIT log level and we are using a shim to make it appear that CRIT logs are actually appearing.

See this example below:

> lighthouse bn --execution-endpoint "http://localhost:8551" --debug-level crit
Unsupported log level

> lighthouse bn --execution-endpoint "http://localhost:8551" --debug-level help
error: invalid value 'help' for '--debug-level <LEVEL>'
  [possible values: info, debug, trace, warn, error, crit]

Possible Solutions

  1. Remove crit as an option from the CLI entirely and map --debug-level crit to --debug-level error with a deprecation notice. This is simplest solution, users can just move to using --debug-level error, which while isn't as strict as crit, might be fine. I suspect most users aren't using --debug-level crit anyway.
  2. Intercept the CLI value, convert it to LevelFilter::Error. We then need to find a way to restrict log output to only ERRORs which are using the crit! shim, I think we can slightly modify the log extractor to get this to work.

Additional Info

The same applies to --logfile-debug-level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions