oxidecomputer / oxidecomputer/falcon

Migrate from slog to tracing.

Open
#86 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
20
Forks
5
Avg merge
11d 13h
Merged PRs (30d)
2

Description

Slog itself recommends using tracing, so let's use tracing.

Also: slog env_looger is a bit derpy to set up with defaults that provide useful logging information for falcon CLI applications. In particular, the need to set the environment variable RUST_LOG with std::env::set_var is unsafe from multi-threaded code.

https://github.com/oxidecomputer/falcon/blob/979dc8471964bd01bb7872fcb981c0bf46484b9b/lib/src/lib.rs#L252-L261

Hopefully, we can find a better path forward with tracing for user-configurable log levels with a useful default.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading lib/src/lib.rs lines 252-261 and the issue's linked Rust documentation for std::env::set_var. Trace how slog and RUST_LOG are currently configured for Falcon CLI applications. Done means the logging approach uses tracing, supports user-configurable log levels safely, and retains useful defaults.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.