-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(cli): Improve CLI logging #4060
Conversation
I think this doesn't compile on linux or windows 🤔 but my rust-analyzer seems to be broken rn |
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.
top5 best Tauri PRs easily
Bug alert, on Windows, if you have |
Is that using the latest commit from @lucasfernog? Maybe it has to do with the piping? I had a bunch of issues while developing with disappearing output too. Maybe not though, since it's the same implementation as before basically. @lucasfernog do we need |
We do need the os_pipe @JonasKruckenberg otherwise the binding just won't show the output. |
@amrbashir that was fixed in my commits. |
Oh then I might've checked with an older commit. I tested the branch twice and I missed a git pull in between. Edit: just tested latest commits and it works. |
Niiice 🥳 |
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information
This PR overhauls the CLI's output, completely moving it from a custom logging solution to the standard
log
andenv_logger
crates. Towards this goal I removed all printing functionality from the bundler, cleaning up concerns and bringing the bundler one step closer to being a reusable library.Major new feature
For this we leverage a custom KV attribute for log macros:
action
that will take the log levels position in the output.info!(action = "Bundling"; "{}", app_product_name);
producesBundling <App Name>
--verbose
flag and theRUST_LOG
env var. (The flag can appear multiple times, where--verbose
meansDebug
and--verbose --verbose
meansTrace
)