-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[CT-1917] [Regression] Non-error log is not silenced by -q
flag.
#6749
Comments
-q
flag.-q
flag.
My suspicion here is:
Confirmed: ipdb> task = parsed.cls.from_args(args=parsed)
15:01:43 target not specified in profile 'my-profile', using 'default' Options:
|
Hi @jtcohen6 , thanks a lot for replying. If that resonates, care to share any guidelines on how can I make this contribution? |
I think it would be as simple as modifying line 117 to pass a level override into EVENT_MANAGER.add_logger(
_get_logbook_log_config() if flags.ENABLE_LEGACY_LOGGER else _get_stdout_config(EventLevel.ERROR)
) @peterallenwebb How does this approach sound to you? The downside is, I think we'd never actually log |
The approach would work, and it would indeed have the consequences you described. We could, however, add some log configuration code right after command line arguments are parsed so that we can turn on quiet mode as soon as possible, if it is specified. I think I actually like that approach better? |
@peterallenwebb Let's give it a shot! While it might not work perfectly for "quiet mode," if set via env var or user config, I generally expect users to pass it in as a CLI flag, as @elongl is showing above. |
Is this a regression in a recent version of dbt-core?
Current Behavior
According to
-q
:A new log is printed even though it's not an error.
Expected/Previous Behavior
Previously, the log was omitted when passing the
-q
flag.Steps To Reproduce
default
target without having atarget
defined.-q
flag.Relevant log output
No response
Environment
Which database adapter are you using with dbt?
No response
Additional Context
I'd love to contribute.
The text was updated successfully, but these errors were encountered: