Update dbt-metricflow package tests to check logging to the log file#1934
Open
plypaul wants to merge 1 commit intop/fix_cli_logging__02from
Open
Update dbt-metricflow package tests to check logging to the log file#1934plypaul wants to merge 1 commit intop/fix_cli_logging__02from
dbt-metricflow package tests to check logging to the log file#1934plypaul wants to merge 1 commit intop/fix_cli_logging__02from
Conversation
tlento
approved these changes
Nov 18, 2025
Contributor
tlento
left a comment
There was a problem hiding this comment.
It'd be good to clean up the magic string before merge, or if that's an annoying thing requiring package updates and deployment then a follow up is fine.
| ) | ||
|
|
||
| # Check that log messages are written as spected to the log file. | ||
| log_file_path = tutorial_directory.joinpath("logs", CLIConfiguration.LOG_FILE_NAME) |
Contributor
There was a problem hiding this comment.
"logs" is a magic string. Is there no constant for that path location name?
plypaul
added a commit
that referenced
this pull request
Dec 18, 2025
The `mf` CLI was not logging `INFO` messages to the log file. This was traced to an imported module setting up the log configuration and `logging.basicConfig` becoming a no-op if handlers were already added to the root logger. This PR updates the CLI's logging setup method to use `logging.basicConfig(..., force=True)` to address the no-op case and cleans up how the stream handler and the log file handler are set up. A test is added separately #1934 due to a required PR in the middle.
1238a0b to
7ff4a4d
Compare
a3a22e2 to
05c0a5b
Compare
38ef62a to
7ff4a4d
Compare
05c0a5b to
fd4886e
Compare
fd4886e to
ddb0a92
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As per title.