Skip to content

Migrate from slog to tracing. #86

@rcgoodfellow

Description

@rcgoodfellow

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.

falcon/lib/src/lib.rs

Lines 252 to 261 in 979dc84

match std::env::var("RUST_LOG") {
Ok(s) => {
if s.is_empty() {
std::env::set_var("RUST_LOG", "info");
}
}
_ => {
std::env::set_var("RUST_LOG", "info");
}
}

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

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