Show bcbench-core logs and pass logging inputs explicitly - #918
Draft
Sun Haoran (haoranpb) wants to merge 1 commit into
Draft
Sun Haoran (haoranpb) wants to merge 1 commit into
Sun Haoran (haoranpb) wants to merge 1 commit into
Conversation
Sun Haoran (haoranpb)
added this pull request to stack #916
October 2, 2026 13:04
The app raised only the `bcbench` logger above the root's WARNING level, so INFO logs from bcbench_core modules would be dropped once code that logs at INFO moves into core. - setup_logger raises both `bcbench` and `bcbench_core` to INFO (DEBUG with debug); third-party loggers stay at WARNING - setup_logger takes debug and github_actions instead of reading config; the CLI callback derives them from --verbose and the environment Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3fa47b3c-f5d6-4c36-9be3-c4fdf2bebe47
Sun Haoran (haoranpb)
force-pushed
the
core/stack-03-logging
branch
from
October 2, 2026 13:12
11dba85 to
545ba3d
Compare
This branch has not been deployed
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.
Stack 3 of the
bcbench-coreextraction, stacked on #917. Prepares logging for code that logs at INFO (git operations) moving into the library.Problem:
setup_loggerkeeps the root logger at WARNING (to quiet third-party libraries) and raises only thebcbenchlogger to INFO. Records frombcbench_core.*modules inherit the root level, so their INFO logs would be dropped. Their warnings and errors already reach the root handlers, including GitHub Actions annotations.Change:
setup_loggerraises bothbcbenchandbcbench_coreto INFO (DEBUG with--verboseor runner debug). Third-party loggers stay at WARNING.setup_logger(*, debug, github_actions)takes explicit inputs instead of callingget_config(). The CLI callback derives them from--verbose,RUNNER_DEBUG, andGITHUB_ACTIONS, sobcbench.loggerno longer imports config.logging.getLogger(__name__)and never add handlers or set levels; only the CLI entry point configures logging.Handlers, formatting, redaction, annotations, and
get_loggerare unchanged.Tests:
TestSetupLoggercovers core INFO visibility, third-party suppression, debug levels, and a core error producing exactly one GitHub annotation without duplicate console output.