shuttle icon indicating copy to clipboard operation
shuttle copied to clipboard

[Bug]: Logging still happens even with shuttle_runtime --no-default-features flag

Open joshua-mo-143 opened this issue 2 years ago • 2 comments

What happened?

Installing shuttle_runtime with no default features still causes logging to happen. Adding a custom subscriber with timestamps causes double timestamping.

Discord conversation reference: https://discord.com/channels/803236282088161321/953005742842069013/1200211085253427280

Version

v0.37.0

Which operating system(s) are you seeing the problem on?

Linux

Which CPU architectures are you seeing the problem on?

x86_64

Relevant log output

(see the referenced discord conversation)

Duplicate declaration

  • [X] I have searched the issues and there are none like this.

joshua-mo-143 avatar Jan 25 '24 23:01 joshua-mo-143

That logs are recorded without the default tracing subscriber is expected, we capture any logs written to stdout by an application, and this is documented. We could add a note about the timestamps as explained by Johan in the linked thread, however, and perhaps update the example custom subscriber to not record timestamps.

It's also the case that if you don't write to stdout and rather export to e.g. Datadog, the logs sent to Datadog will not have extra timestamps.

oddgrd avatar Jan 26 '24 17:01 oddgrd

We could also consider making it possible to opt-out of the timestamps set by us, but that would require some further investigation.

oddgrd avatar Jan 26 '24 17:01 oddgrd