Skip to content

Inference status table is unreadable after print()→logger migration (PR #60) #66

Description

@ff225

Context

PR #60 (8b6e7f0, "fix(communication): replace print() with structured logging") replaced the print() calls in request_handler.py with logger.info(). This regressed the readability of the inference status table (device / offload layer / acquisition / device compute / edge compute / net / total).

Problem

The table was designed as an aligned, human-readable grid emitted verbatim to stdout. Routing each row through logger.info() means every row is now prefixed by the logger formatter (src/server/logger/log.py:48):

%(asctime)s - %(levelname)-8s - %(file_info)-40s - ...%(message)s

Consequences:

  • The ~70-char timestamp/level/file prefix breaks column alignment, so the table no longer lines up.
  • Table rows are interleaved with every other logger.info/debug (network speed, model registration, delay simulation, profiler), burying the "which layer / what timings" signal in verbose noise.

Proposed fix

Give the table its own dedicated console logger, decoupled from the diagnostic log stream:

  1. src/server/logger/log.py: add a table_logger (server.table) with a plain %(message)s formatter, its own stdout handler, propagate=False, fixed at INFO so it stays visible regardless of the verbose setting.
  2. src/server/communication/request_handler.py: route _print_inference_table_header / _print_inference_table_row through table_logger instead of logger.

This preserves the aligned table, keeps it separate from verbose diagnostics, and lets verbose: false silence the noise while still showing the table.

Follow-up to #12 / PR #60.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions