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: log feature breaks existing event macro usages #196

Closed
LucioFranco opened this issue Jul 18, 2019 · 0 comments · Fixed by #1823
Closed

tracing: log feature breaks existing event macro usages #196

LucioFranco opened this issue Jul 18, 2019 · 0 comments · Fixed by #1823
Assignees
Labels
crate/tracing Related to the `tracing` crate kind/bug Something isn't working

Comments

@LucioFranco
Copy link
Member

LucioFranco commented Jul 18, 2019

image

@hawkw hawkw self-assigned this Jul 18, 2019
@hawkw hawkw added crate/tracing Related to the `tracing` crate kind/bug Something isn't working labels Jul 18, 2019
Skepfyr added a commit to Skepfyr/tracing that referenced this issue Jan 9, 2022
This cheanges 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 added a commit to Skepfyr/tracing that referenced this issue Jan 9, 2022
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
hawkw pushed a commit that referenced this issue Jan 29, 2022
## Motivation

Fixes: #196, #1739

Previously, the `field` token trees would be substituted into the log
macro invocation and the `ValueSet`, potentially meaning they are
executed more than once. 


## Solution

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. It
does this by generating the log using the `ValueSet` meaning the token
trees are only substituted once.
hawkw pushed a commit that referenced this issue Feb 3, 2022
## Motivation

Fixes: #196, #1739

Previously, the `field` token trees would be substituted into the log
macro invocation and the `ValueSet`, potentially meaning they are
executed more than once.

## Solution

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. It
does this by generating the log using the `ValueSet` meaning the token
trees are only substituted once.
hawkw pushed a commit that referenced this issue Feb 3, 2022
## Motivation

Fixes: #196, #1739

Previously, the `field` token trees would be substituted into the log
macro invocation and the `ValueSet`, potentially meaning they are
executed more than once.

## Solution

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. It
does this by generating the log using the `ValueSet` meaning the token
trees are only substituted once.
hawkw pushed a commit that referenced this issue Feb 3, 2022
## Motivation

Fixes: #196, #1739

Previously, the `field` token trees would be substituted into the log
macro invocation and the `ValueSet`, potentially meaning they are
executed more than once.

## Solution

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. It
does this by generating the log using the `ValueSet` meaning the token
trees are only substituted once.
hawkw pushed a commit that referenced this issue Feb 3, 2022
## Motivation

Fixes: #196, #1739

Previously, the `field` token trees would be substituted into the log
macro invocation and the `ValueSet`, potentially meaning they are
executed more than once.

## Solution

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. It
does this by generating the log using the `ValueSet` meaning the token
trees are only substituted once.
hawkw pushed a commit that referenced this issue Feb 4, 2022
## Motivation

Fixes: #196, #1739

Previously, the `field` token trees would be substituted into the log
macro invocation and the `ValueSet`, potentially meaning they are
executed more than once.

## Solution

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. It
does this by generating the log using the `ValueSet` meaning the token
trees are only substituted once.
kaffarell pushed a commit to kaffarell/tracing that referenced this issue May 22, 2024
## Motivation

Fixes: tokio-rs#196, tokio-rs#1739

Previously, the `field` token trees would be substituted into the log
macro invocation and the `ValueSet`, potentially meaning they are
executed more than once.

## Solution

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. It
does this by generating the log using the `ValueSet` meaning the token
trees are only substituted once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate/tracing Related to the `tracing` crate kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants