-
Notifications
You must be signed in to change notification settings - Fork 997
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: enable tabby to print debug logs #812
Conversation
You could enable debug log by setting
Maybe just add this to FAQ? |
I have tried the
I am not sure why it is set INFO here but maybe we can remove that and accept the |
The goal is to enable default info-level logging for the Tabby package. Perhaps we can implement a check to prevent the acceptance of a more verbose environment variable override, such as |
Oh, I just realized the default tracing log level is ERROR not INFO if
Why do we need to avoid a verbose environment variable override. I mean we definitely need to print debug logs in Tabby package, right? |
To avoid pretenting the acceptance :) Based on https://docs.rs/tracing-subscriber/latest/src/tracing_subscriber/filter/env/builder.rs.html#69 A proper implementation would be let filter = EnvFilter::builder()
.with_default_directive(LevelFilter::ERROR.into())
.parse_lossy("tabby=info")
...
.from_env_lossy() |
Hi @wsxiaoys if I am understanding correctly, we want to set the default log level to be error, and set default tabby log level to be info. At the same time we want the envrionment log settings to be able to override the default tabby log level? I check the tracing-subscriber doc and find there is no way of doing that.
So I just set default directive to be |
I think it's still doable - though you might need dig into the implementation of |
This is done recently: tabby/crates/tabby/src/main.rs Line 223 in 24c544c
|
Add --enable-debug flag so tabby will print debug logs.