fix(logger): dedicated console logger for the inference status table#67
Merged
Merged
Conversation
PR #60 replaced the inference-table print() calls with logger.info(), which prefixed every row with the timestamp/level/file formatter, broke the column alignment, and interleaved the table with the verbose diagnostic log stream. Add a dedicated `table_logger` (server.table) with a plain %(message)s format on stdout, propagate=False, fixed at INFO so it stays visible regardless of the `verbose` setting. Route the header/row printers through it. Closes #66
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.
Closes #66. Follow-up to #12 / PR #60.
Problem
PR #60 replaced the inference-table
print()calls inrequest_handler.pywithlogger.info(). Every table row then went through the logger formatter (src/server/logger/log.py), which:asctime - level - file:func:linestring, breaking the column alignment, andFix
Add a dedicated
table_logger(server.table) decoupled from the diagnostic logger:%(message)sformatter on stdout (matches the pre-PR-60print()target; defaultStreamHandleris stderr),propagate=Falseso it never double-emits through root,INFOso the table stays visible even whenverbose: falsesilences the noisy INFO/DEBUG stream._print_inference_table_header/_print_inference_table_rownow usetable_logger.Testing
Verified manually before commit:
logger/root to CRITICAL.tests/unit/test_no_print_statements.py(added in PR #60) still passes.