HomePhabricator
Diffusion Comm 22fde1efd8e0

[services][blob] Use tracing for logs

Description

[services][blob] Use tracing for logs

Summary:
Related ENG-2308

Similar to identity service, I introduced the tracing library here. I enhanced its configuration to take level filter from environment variables. It defaults to INFO everywhere, what corresponds to the identity service behavior.

Default environment variable name is RUST_LOG but it can be changed if needed.

A few examples:

  • cargo run - (default) showing INFO logs and higher (warn/error)
  • RUST_LOG=debug - showing DEBUG+, includes dependencies (e.g. AWS logs)
  • RUST_LOG=blob=trace - showing TRACE+ logs for the blob service, INFO+ for dependencies

Depends on D5728

Adding @ashoat as this introduces a new dependency (already used in identity service though).

Test Plan: RUST_LOG=blob=trace cargo run and see the logs

Reviewers: varun, ashoat, tomek, marcin, jon, max

Reviewed By: varun, ashoat, tomek, max

Subscribers: max, atul, ashoat

Differential Revision: https://phab.comm.dev/D5729

Details

Provenance
bartekAuthored on Nov 28 2022, 2:05 AM
Reviewer
varun
Differential Revision
D5729: [services][blob] Use tracing for logs
Parents
rCOMM71d6e99debd9: [services][blob] Use Rust implementation in Dockerfile
Branches
Unknown
Tags
Unknown