Skip to content

Commit 7360c0e

Browse files
xsuchyclaude
authored andcommitted
fix: --verbose no longer duplicates build log into root log (#1302)
When --verbose was used, the build logger's propagate flag was set to 1, causing build output to bubble up to the parent mockbuild logger which has a root.log FileHandler. This resulted in build.log content being entirely duplicated in root.log (and installed_packages log as well). Console output during builds is already handled by direct stdout writes in logOutput(), so the propagation on the build logger was unnecessary. Resolves: #1302 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 499b08c commit 7360c0e

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

mock/py/mock.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,6 @@ def setup_logging(config_path, config_opts, options):
539539
log.handlers[0].setLevel(logging.INFO)
540540
elif options.verbose == 2:
541541
log.handlers[0].setLevel(logging.DEBUG)
542-
logging.getLogger("mockbuild.Root.build").propagate = 1
543542
logging.getLogger("mockbuild").propagate = 1
544543

545544
# enable tracing if requested
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The `--verbose` option no longer duplicates the build log output into the root
2+
log.

0 commit comments

Comments
 (0)