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

Missing log message when using compact formatter #1741

Closed
fribeau opened this issue Nov 22, 2021 · 3 comments
Closed

Missing log message when using compact formatter #1741

fribeau opened this issue Nov 22, 2021 · 3 comments

Comments

@fribeau
Copy link

fribeau commented Nov 22, 2021

Bug Report

compact formatter only display timestamp, leveland target. The log content is not displayed.

Version

tracing: 0.1.29
tracing-subscriber: 0.3.2

Platform

Linux fedora 33

Crates

tracing-subscriber

Description

fn main() {
    tracing_subscriber::fmt().compact().init();

    tracing::info!("Message");
}

Output only

2021-11-22T11:04:45.533429Z INFO toto:

There is no message

@Folyd
Copy link
Contributor

Folyd commented Nov 23, 2021

After upgrading the tracing-subscriber from 0.3.1 to 0.3.2. The same problem occurred.

@vulpyne
Copy link

vulpyne commented Nov 29, 2021

This is definitely broken in 0.3.2. 0.3.1 has the expected behavior.

0.3.2 really should be pulled from crates.io et al. In the meantime, the workarounds are either to use a format other than compact or to set the crate version to =0.3.1 in Cargo.toml

hawkw added a commit that referenced this issue Nov 29, 2021
The line of code that prints the event's fields (including its message)
was accidentally deleted in 0a16972,
while backporting PR #1696 from `master` (where the `Compact`) formatter
implementation is significantly different.

This branch puts it back.

Fixes #1741
hawkw added a commit that referenced this issue Nov 29, 2021
The line of code that prints the event's fields (including its message)
was accidentally deleted in 0a16972,
while backporting PR #1696 from `master` (where the `Compact` formatter
implementation is significantly different).

This branch puts it back. Also, I've added tests for the `Compact` formatter's
output, to guard against accidentally breaking it in the future. Previously, we
only had tests for the `Full` and `Json` formatters.

Fixes #1741

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw
Copy link
Member

hawkw commented Nov 29, 2021

Fixed by #1755.

@hawkw hawkw closed this as completed Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants