Skip to content

Replace log_err() by #[tracing::instrument(err(Debug))] #68

Description

@ejpcmac

Context

We currently log errors through an extension trait on Result<T, E> that adds a log_err method. This has two issues:

  1. this is verbose and easy to forget,
  2. the reported module in logs is the helpers module instead of the module where the error is generated.

Concept

Let’s enable err(Debug) wherever applicable and remove all .log_err() instances.

Note

If needed in some case, Result::inspect_err can be used as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions