Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracing: fix macros "use of moved value" with log #1823

Merged
merged 12 commits into from
Jan 29, 2022

Commits on Jan 9, 2022

  1. tracing: fix macros "use of moved value" with log

    This changes the event macro (and all the upstream macros like info!),
    so that it only uses each field once when the log feature is enabled.
    Previously, the `field` token trees would be substituted into the log
    macro invocation and the `ValueSet`, potentially meaning they are
    executed more than once. This change generates the log using the
    `ValueSet` meaning the token trees are only substituted once.
    
    Fixes: tokio-rs#196, tokio-rs#1739
    Skepfyr committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    874a462 View commit details
    Browse the repository at this point in the history
  2. tracing: fix span macros with log feature

    Fixes the span macro to only substitute the field expressions once when
    the log feature is enabled. This stops enabling the log feature causing
    "use of moved value" errors and other odd behaviour.
    # Please enter the commit message for your changes. Lines starting
    # with '#' will be ignored, and an empty message aborts the commit.
    #
    # On branch macros-with-log
    # Your branch is up to date with 'origin/macros-with-log'.
    #
    # Changes to be committed:
    #	modified:   ../tracing/src/macros.rs
    #
    # Changes not staged for commit:
    #	modified:   Cargo.toml
    #
    # Untracked files:
    #	examples/log-move.rs
    #
    Skepfyr committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    bc81ef5 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2022

  1. tracing: revert fix span macros with log feature

    This reverts commit bc81ef5. The
    issue with the event macro does not apply to the span macro.
    Skepfyr committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    0ad95a9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    68b56d0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c20567a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    50fd7f2 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2022

  1. Configuration menu
    Copy the full SHA
    b4c6208 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2022

  1. Configuration menu
    Copy the full SHA
    ce02eda View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2022

  1. Configuration menu
    Copy the full SHA
    a691c5b View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2022

  1. Configuration menu
    Copy the full SHA
    a4e8d26 View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2022

  1. Configuration menu
    Copy the full SHA
    0c1ab2b View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2022

  1. Configuration menu
    Copy the full SHA
    794040e View commit details
    Browse the repository at this point in the history