Skip to content

Conversation

@nickbar01234
Copy link

@nickbar01234 nickbar01234 commented Nov 8, 2025

Overview

Add a global option to set consola log-level. --debug mode will take priority if set in conjunction.

Related Issue

This PR closes #1942

@netlify
Copy link

netlify bot commented Nov 8, 2025

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 57be970
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6946eb2940ccf400074c086c
😎 Deploy Preview https://deploy-preview-1973--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nickbar01234
Copy link
Author

Need to also update docs on the new CLI option, but would like your input first @aklinker1

@aklinker1 aklinker1 changed the title Add log --level cli option feat: Add log --level cli option Dec 16, 2025
aklinker1
aklinker1 previously approved these changes Dec 16, 2025
Copy link
Member

@aklinker1 aklinker1 left a 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!

@aklinker1 aklinker1 changed the title feat: Add log --level cli option feat: Add log --level cli option Dec 16, 2025
const cli = cac('wxt');

cli.option('--debug', 'enable debug mode');
cli.option('--level <level>', 'specify log level');
Copy link
Member

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?

Copy link
Author

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?

Copy link
Member

@aklinker1 aklinker1 Dec 18, 2025

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)

Copy link
Author

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

@aklinker1 aklinker1 dismissed their stale review December 16, 2025 16:33

Had an afterthought

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add log level option to wxt --debug mode

2 participants