-
Notifications
You must be signed in to change notification settings - Fork 827
Open
Description
Feature Request
Crates
tracing_subscriber
Motivation
On the current nightly, the thread ID is now printed as part of the panic messages:
thread 'main' (13) panicked at src/main.rs:2:5:
explicit panic
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
It would be nice to have an easy way to coordinate this with tracing events, as well as with debugger output and process managers.
Proposal
Add the following:
Layer::with_os_thread_ids
SubscriberBuilder::with_os_thread_ids
Format::with_os_thread_ids
This matches with_thread_ids
in each of the same places.
Unfortunately there is no way to get the OS TID in std
: not sure whether this is a dealbreaker or not. It is a simple libc
call on most platforms:
(there is a gettid
crate but it is broken, and I don't think there is any need to pull in a crate for 3-6 definitions).
Alternatives
with_thread_ids
could be changed to emit the OS TID.
Metadata
Metadata
Assignees
Labels
No labels