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

macros: Fix missing field prefixes #2878

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 40 additions & 40 deletions tracing/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1307,10 +1307,10 @@ macro_rules! trace {
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::TRACE, { $($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::TRACE, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::TRACE, { ?$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::TRACE, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::TRACE, { %$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::TRACE, {}, $($arg)+)
Expand All @@ -1324,10 +1324,10 @@ macro_rules! trace {
$crate::event!(name: $name, target: $target, $crate::Level::TRACE, { $($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::TRACE, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, $crate::Level::TRACE, { ?$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::TRACE, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, $crate::Level::TRACE, { %$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::TRACE, {}, $($arg)+)
Expand All @@ -1341,10 +1341,10 @@ macro_rules! trace {
$crate::event!(target: $target, parent: $parent, $crate::Level::TRACE, { $($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::TRACE, { $($k).+ $($field)+ })
$crate::event!(target: $target, parent: $parent, $crate::Level::TRACE, { ?$($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::TRACE, { $($k).+ $($field)+ })
$crate::event!(target: $target, parent: $parent, $crate::Level::TRACE, { %$($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::TRACE, {}, $($arg)+)
Expand All @@ -1358,10 +1358,10 @@ macro_rules! trace {
$crate::event!(name: $name, parent: $parent, $crate::Level::TRACE, { $($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::TRACE, { $($k).+ $($field)+ })
$crate::event!(name: $name, parent: $parent, $crate::Level::TRACE, { ?$($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::TRACE, { $($k).+ $($field)+ })
$crate::event!(name: $name, parent: $parent, $crate::Level::TRACE, { %$($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::TRACE, {}, $($arg)+)
Expand Down Expand Up @@ -1584,10 +1584,10 @@ macro_rules! debug {
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::DEBUG, { $($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::DEBUG, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::DEBUG, { ?$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::DEBUG, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::DEBUG, { %$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::DEBUG, {}, $($arg)+)
Expand All @@ -1601,10 +1601,10 @@ macro_rules! debug {
$crate::event!(name: $name, target: $target, $crate::Level::DEBUG, { $($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::DEBUG, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, $crate::Level::DEBUG, { ?$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::DEBUG, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, $crate::Level::DEBUG, { %$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::DEBUG, {}, $($arg)+)
Expand All @@ -1618,10 +1618,10 @@ macro_rules! debug {
$crate::event!(target: $target, parent: $parent, $crate::Level::DEBUG, { $($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::DEBUG, { $($k).+ $($field)+ })
$crate::event!(target: $target, parent: $parent, $crate::Level::DEBUG, { ?$($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::DEBUG, { $($k).+ $($field)+ })
$crate::event!(target: $target, parent: $parent, $crate::Level::DEBUG, { %$($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::DEBUG, {}, $($arg)+)
Expand All @@ -1635,10 +1635,10 @@ macro_rules! debug {
$crate::event!(name: $name, parent: $parent, $crate::Level::DEBUG, { $($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::DEBUG, { $($k).+ $($field)+ })
$crate::event!(name: $name, parent: $parent, $crate::Level::DEBUG, { ?$($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::DEBUG, { $($k).+ $($field)+ })
$crate::event!(name: $name, parent: $parent, $crate::Level::DEBUG, { %$($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::DEBUG, {}, $($arg)+)
Expand Down Expand Up @@ -1872,10 +1872,10 @@ macro_rules! info {
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::INFO, { $($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::INFO, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::INFO, { ?$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::INFO, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::INFO, { %$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::INFO, {}, $($arg)+)
Expand All @@ -1889,10 +1889,10 @@ macro_rules! info {
$crate::event!(name: $name, target: $target, $crate::Level::INFO, { $($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::INFO, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, $crate::Level::INFO, { ?$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::INFO, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, $crate::Level::INFO, { %$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::INFO, {}, $($arg)+)
Expand All @@ -1906,10 +1906,10 @@ macro_rules! info {
$crate::event!(target: $target, parent: $parent, $crate::Level::INFO, { $($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::INFO, { $($k).+ $($field)+ })
$crate::event!(target: $target, parent: $parent, $crate::Level::INFO, { ?$($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::INFO, { $($k).+ $($field)+ })
$crate::event!(target: $target, parent: $parent, $crate::Level::INFO, { %$($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::INFO, {}, $($arg)+)
Expand All @@ -1923,10 +1923,10 @@ macro_rules! info {
$crate::event!(name: $name, parent: $parent, $crate::Level::INFO, { $($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::INFO, { $($k).+ $($field)+ })
$crate::event!(name: $name, parent: $parent, $crate::Level::INFO, { ?$($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::INFO, { $($k).+ $($field)+ })
$crate::event!(name: $name, parent: $parent, $crate::Level::INFO, { %$($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::INFO, {}, $($arg)+)
Expand Down Expand Up @@ -2153,10 +2153,10 @@ macro_rules! warn {
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::WARN, { $($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::WARN, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::WARN, { ?$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::WARN, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::WARN, { %$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::WARN, {}, $($arg)+)
Expand All @@ -2170,10 +2170,10 @@ macro_rules! warn {
$crate::event!(name: $name, target: $target, $crate::Level::WARN, { $($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::WARN, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, $crate::Level::WARN, { ?$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::WARN, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, $crate::Level::WARN, { %$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::WARN, {}, $($arg)+)
Expand All @@ -2187,10 +2187,10 @@ macro_rules! warn {
$crate::event!(target: $target, parent: $parent, $crate::Level::WARN, { $($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::WARN, { $($k).+ $($field)+ })
$crate::event!(target: $target, parent: $parent, $crate::Level::WARN, { ?$($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::WARN, { $($k).+ $($field)+ })
$crate::event!(target: $target, parent: $parent, $crate::Level::WARN, { %$($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::WARN, {}, $($arg)+)
Expand All @@ -2204,10 +2204,10 @@ macro_rules! warn {
$crate::event!(name: $name, parent: $parent, $crate::Level::WARN, { $($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::WARN, { $($k).+ $($field)+ })
$crate::event!(name: $name, parent: $parent, $crate::Level::WARN, { ?$($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::WARN, { $($k).+ $($field)+ })
$crate::event!(name: $name, parent: $parent, $crate::Level::WARN, { %$($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::WARN, {}, $($arg)+)
Expand Down Expand Up @@ -2430,10 +2430,10 @@ macro_rules! error {
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::ERROR, { $($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::ERROR, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::ERROR, { ?$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::ERROR, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::ERROR, { %$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, target: $target, parent: $parent, $crate::Level::ERROR, {}, $($arg)+)
Expand All @@ -2447,10 +2447,10 @@ macro_rules! error {
$crate::event!(name: $name, target: $target, $crate::Level::ERROR, { $($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::ERROR, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, $crate::Level::ERROR, { ?$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::ERROR, { $($k).+ $($field)+ })
$crate::event!(name: $name, target: $target, $crate::Level::ERROR, { %$($k).+ $($field)+ })
);
(name: $name:expr, target: $target:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, target: $target, $crate::Level::ERROR, {}, $($arg)+)
Expand All @@ -2464,10 +2464,10 @@ macro_rules! error {
$crate::event!(target: $target, parent: $parent, $crate::Level::ERROR, { $($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::ERROR, { $($k).+ $($field)+ })
$crate::event!(target: $target, parent: $parent, $crate::Level::ERROR, { ?$($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::ERROR, { $($k).+ $($field)+ })
$crate::event!(target: $target, parent: $parent, $crate::Level::ERROR, { %$($k).+ $($field)+ })
);
(target: $target:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(target: $target, parent: $parent, $crate::Level::ERROR, {}, $($arg)+)
Expand All @@ -2481,10 +2481,10 @@ macro_rules! error {
$crate::event!(name: $name, parent: $parent, $crate::Level::ERROR, { $($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, ?$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::ERROR, { $($k).+ $($field)+ })
$crate::event!(name: $name, parent: $parent, $crate::Level::ERROR, { ?$($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, %$($k:ident).+ $($field:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::ERROR, { $($k).+ $($field)+ })
$crate::event!(name: $name, parent: $parent, $crate::Level::ERROR, { %$($k).+ $($field)+ })
);
(name: $name:expr, parent: $parent:expr, $($arg:tt)+ ) => (
$crate::event!(name: $name, parent: $parent, $crate::Level::ERROR, {}, $($arg)+)
Expand Down
Loading
Loading