Replies: 1 comment 1 reply
-
I think you’d want to use tracing-subscriber’s reload module: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/reload/index.html. Two things to note:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature Request
Motivation
I am trying to debug a nasty issue in Miri. I need to trace what happens during a certain part of the execution of the program. However, the issue starts billions of steps into the execution -- if I set the log-level to
info
, which enables per-step tracing in Miri, I will get hundreds of gigabytes of log before the interesting part of the execution even starts. So I'd like to start with no logging, and then when a certain event happens (programmatically detected inside the interpreter), I'd like to call some function in thetracing
API that enables logging starting now.Proposal
Tracing already has this notion of "subscribers", but it doesn't let me swap out the global subscriber so this doesn't help. I can set a per-thread subscriber, but:
I have no idea what the best way is to achieve this. I barely know
tracing
. All I know is I can set filters, and I want the filter to change during execution -- or something that has the equivalent effect.Cc @oli-obk
Beta Was this translation helpful? Give feedback.
All reactions