-
-
Notifications
You must be signed in to change notification settings - Fork 433
feat: Add log --level cli option
#1973
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Need to also update docs on the new CLI option, but would like your input first @aklinker1 |
aklinker1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea, thanks for the PR!
--level cli option
packages/wxt/src/cli/commands.ts
Outdated
| const cli = cac('wxt'); | ||
|
|
||
| cli.option('--debug', 'enable debug mode'); | ||
| cli.option('--level <level>', 'specify log level'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to document this more? Specifically, which values are available? Either the numbers or the string literals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep. Do you prefer this be part of the cli or in the public docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't document the CLI flags other than what's printed when running a command with --help, so lets put them in the CLI.
https://wxt.dev/api/cli/wxt-build.html
It will be a bit longer than the rest of the flag descriptions, but that's fine.
specify log level (debug|info|...?|error|fatal)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed the changes specifying the option
Overview
Add a global option to set consola log-level.
--debugmode will take priority if set in conjunction.Related Issue
This PR closes #1942