Skip to content

refactor(web): replace eprintln! error logging with tracing/log #516

@dekobon

Description

@dekobon

Status: RESOLVED in fix/516-web-tracing-logging (commit 453805d).
bca-web now logs via tracing (error! for parse failures, warn!
for timeouts, each with a structured payload_id field) and wires
tracing-actix-web's TracingLogger middleware for per-request spans.
See the resolution comment for details.


Summary

bca-web logs server-side errors with eprintln! inside request handling:

  • big-code-analysis-web/src/web/server.rs:107
    eprintln!("Parse task failed: {e}")
  • big-code-analysis-web/src/web/server.rs:129

No log levels, timestamps, request correlation, or structured fields; the
output cannot be filtered or routed by a production log pipeline.

Suggested fix

Adopt tracing (or log + env_logger), emit at error!, and include the
request id already carried in the payload (payload.id). Wire actix's
TracingLogger/Logger middleware for request-level spans.

Pre-2.0 polish for the network service. Label: enhancement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions