-
Notifications
You must be signed in to change notification settings - Fork 218
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
Add global --debug
flag to enable debug logs (ala LOG_LEVEL=debug
)
#583
Comments
- part of superfly#583 - added debug global flag to see debug logs of commands in terminal Signed-off-by: Rohit Dandamudi <rohitdandamudi.1100@gmail.com>
Hey! I tried to implement this, it was easier to add the global flag and bind it to viper. I am not sure how to access the flag value at places where LOG_LEVEL=debug env is accessed(i.e inside the /internal package and the /terminal package init) 😅 I think there's a mix of old and new commands and how flags are associated with the context/cmdcontext, not sure the way I approached in the draft PR is the right noe, any pointers to go in the right direction are highly appreciated! thanks |
#2704 helps with this |
@billyb2 does that PR achieve the same thing as LOG_LEVEL=debug? Or just sets that env variable? |
It looks like there's already debug level logging via |
But #3107 |
The debug logs are useful for diagnosing issues with the api, builds, remote builders, wireguard, etc. Unfortunately an env variable isn't discoverable so nobody knows about them. We should enable them from a common global flag that people already expect to help with debugging, like
--debug
,--verbose
,--trace
, etc.We might also want to print a message on error instructing the user to try again with that flag.
Hopefully exposing debug logs will help folks figure out issues before heading to the forum or giving up.
The text was updated successfully, but these errors were encountered: