You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running peertest, the logs from every peertest node are concurrently output while the test is run. This makes it very difficult to tell which log is emitted from which node. What we want is to add the node id (just a 6 character prefix, not the entire node id) from each node to every log that it outputs, so that we can tell from where the log originates.
I'm not sure the best way to implement this, it'll likely take some digging around the various logging tools / libraries we use...
Or use Instrument in a way similar to how the utp library uses it.
A glimpse into the desired behavior is to add the with_thread_ids modifier to where we build the tracing subscriber for use in peertest. This will add a prefix to every log that contains the thread id from which that log originates. Of course, rather than the thread id, we want the node id for the respective node. But this example is just to get an idea of the desired behavior, not necessarily the best way to achieve the result.
let subscriber = tracing_subscriber::fmt().with_env_filter(tracing_subscriber::EnvFilter::from_default_env()).with_thread_id(true).with_ansi(trin_utils::log::detect_ansi_support()).finish();
The text was updated successfully, but these errors were encountered:
When running peertest, the logs from every peertest node are concurrently output while the test is run. This makes it very difficult to tell which log is emitted from which node. What we want is to add the node id (just a 6 character prefix, not the entire node id) from each node to every log that it outputs, so that we can tell from where the log originates.
I'm not sure the best way to implement this, it'll likely take some digging around the various logging tools / libraries we use...
Instrument
in a way similar to how the utp library uses it.A glimpse into the desired behavior is to add the with_thread_ids modifier to where we build the tracing subscriber for use in peertest. This will add a prefix to every log that contains the thread id from which that log originates. Of course, rather than the thread id, we want the node id for the respective node. But this example is just to get an idea of the desired behavior, not necessarily the best way to achieve the result.
The text was updated successfully, but these errors were encountered: