-
Notifications
You must be signed in to change notification settings - Fork 38
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
Garbage characters when using tracing #72
Comments
Those look like ANSI escape codes. Perhaps something's trying to pretty-print that information for display in a terminal? |
Yes, they are. But how disable them for We have the config here. But we don't want to disable it globally: let fmt_layer = tracing_subscriber::fmt::Layer::default()
.with_writer(write_to)
.event_format(format)
.with_ansi(false); <-- Need only for tracy
let env_filter_layer = parse_from_file(&conf_file);
let tracy_layer = if std::env::var("SPACETIMEDB_TRACY").is_ok() {
Some(tracing_tracy::TracyLayer::new())
} else {
None
};
let subscriber = tracing_subscriber::Registry::default()
.with(fmt_layer)
.with(tracy_layer)
.with(flame_layer); |
Oh, just reordering the layers works: let subscriber = tracing_subscriber::Registry::default()
.with(tracy_layer)
.with(fmt_layer)
.with(flame_layer); |
Does it truly? I would expect that doing so should change the output of the stdout logs? The truly correct thing to do would be to provide a different type (even if just a newtype) for formatter. That way |
The
tracy
client show garbage characters in the output.When I instrument code like
the
table_id: u32
parameter is joined as zone:I expect it to be
or similar.
The text was updated successfully, but these errors were encountered: