Skip to content

Standarize to use the tracing:: crate for logging #444

Description

@lklimek

In other rust crates indside dashpay org, we use tracing for crate for logging.

In rust-dashcore, it is mixed: some log usages, some tracing usages.

Please standarize to use only tracing in the project.

Some statistics

┌──────────────┬───────────┬───────┐
│ Crate │ tracing:: │ log:: │
├──────────────┼───────────┼───────┤
│ dash-spv │ 305 │ 119 │
├──────────────┼───────────┼───────┤
│ dash-spv-ffi │ 22 │ 0 │
├──────────────┼───────────┼───────┤
│ key-wallet │ 4 │ 0 │
├──────────────┼───────────┼───────┤
│ dash │ 0 │ 18 │
├──────────────┼───────────┼───────┤
│ Total │ 331 │ 137 │
└──────────────┴───────────┴───────┘

tracing dominates 2.4:1 overall. Within dash-spv specifically it's roughly 2.5:1. The log:: usages in dash-spv are concentrated in the network layer (manager.rs, pool.rs, discovery.rs, addrv2.rs, reputation.rs) — these are the files that were
written with log:: originally, while the rest of the crate uses tracing::.

The dash core crate uses only log::, but that's a separate concern.

Bottom line: tracing is the clear convention for dash-spv and its FFI layer. The log:: usages in the network module are the outliers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions