Skip to content

Improve rustwide log format #2336

Closed
@Nemo157

Description

@Nemo157

Current format:

2023-11-24T11:46:27.970312Z  INFO log: sandbox image is local, skipping pull log.target="rustwide::cmd::sandbox" log.module_path="rustwide::cmd::sandbox" log.file="/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustwide-0.16.0/src/cmd/sandbox.rs" log.line=21

Format with tracing-subscriber/tracing-log enabled:

2023-11-24T12:02:28.370137Z  INFO rustwide::cmd::sandbox: sandbox image is local, skipping pull

Activating this feature requires disabling the rustwide log initialization,

rustwide::logging::init_with(LogTracer::new());

which then later results in

thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustwide-0.16.0/src/logging.rs:237:9:
called capture without initializing rustwide::logging
stack backtrace:
   0: std::panicking::begin_panic
   1: docs_rs::docbuilder::rustwide_builder::RustwideBuilder::execute_build
   2: rustwide::build::BuildDirectory::run
   3: docs_rs::docbuilder::rustwide_builder::RustwideBuilder::add_essential_files
   4: cratesfyi::CommandLine::handle_args
   5: cratesfyi::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Blocked by tokio-rs/tracing#2817 (or refactoring rustwide to work with tracing instead of log).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-buildsArea: Building the documentation for a crateS-blockedStatus: marked as blocked ❌ on something else such as an RFC or other implementation work.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions