-
Notifications
You must be signed in to change notification settings - Fork 707
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
Add option to log PID:s #2447
Comments
I think that in the short term, we can and should add it to |
nicolasavru
added a commit
to nicolasavru/tracing
that referenced
this issue
Jul 16, 2023
These options are useful when multiple processes are logging to the same destination (stderr, in the common case). This can happen when a process launches a child process or when a user simply launches multiple processes in the same terminal. Fixes tokio-rs#2447.
nicolasavru
added a commit
to nicolasavru/tracing
that referenced
this issue
Jul 16, 2023
These options are useful when multiple processes are logging to the same destination (stderr, in the common case). This can happen when a process launches a child process or when a user simply launches multiple processes in the same terminal. Fixes tokio-rs#2447. Implement these two options.
nicolasavru
added a commit
to nicolasavru/tracing
that referenced
this issue
Jul 16, 2023
These options are useful when multiple processes are logging to the same destination (stderr, in the common case). This can happen when a process launches a child process or when a user simply launches multiple processes in the same terminal. Fixes tokio-rs#2447. Implement these two options.
nicolasavru
added a commit
to nicolasavru/tracing
that referenced
this issue
Jul 17, 2023
These options are useful when multiple processes are logging to the same destination (stderr, in the common case). This can happen when a process launches a child process or when a user simply launches multiple processes in the same terminal. Fixes tokio-rs#2447. Implement these two options.
nicolasavru
added a commit
to nicolasavru/tracing
that referenced
this issue
Jul 10, 2024
These options are useful when multiple processes are logging to the same destination (stderr, in the common case). This can happen when a process launches a child process or when a user simply launches multiple processes in the same terminal. Fixes tokio-rs#2447. Implement these two options.
nicolasavru
added a commit
to nicolasavru/tracing
that referenced
this issue
Jul 10, 2024
These options are useful when multiple processes are logging to the same destination (stderr, in the common case). This can happen when a process launches a child process or when a user simply launches multiple processes in the same terminal. Fixes tokio-rs#2447. Implement these two options.
nicolasavru
added a commit
to nicolasavru/tracing
that referenced
this issue
Jul 10, 2024
These options are useful when multiple processes are logging to the same destination (stderr, in the common case). This can happen when a process launches a child process or when a user simply launches multiple processes in the same terminal. Fixes tokio-rs#2447. Implement these two options.
nicolasavru
added a commit
to nicolasavru/tracing
that referenced
this issue
Jul 10, 2024
These options are useful when multiple processes are logging to the same destination (stderr, in the common case). This can happen when a process launches a child process or when a user simply launches multiple processes in the same terminal. Fixes tokio-rs#2447. Implement these two options.
nicolasavru
added a commit
to nicolasavru/tracing
that referenced
this issue
Jul 10, 2024
These options are useful when multiple processes are logging to the same destination (stderr, in the common case). This can happen when a process launches a child process or when a user simply launches multiple processes in the same terminal. Fixes tokio-rs#2447. Implement these two options.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Request
Add a way to enable logging the PID for each log line in
tracing-subscriber
.Crates
tracing-subscriber
Motivation
Sometimes you spawn many processes in the same terminal, and want to figure out which is logging what.
Proposal
There is already
.with_thread_ids(true)
, so I suggest adding a.with_pid(true)
;A more general solution would be
.with_custom_string(std::process::id().to_string())
.Alternatives
Users can already implement it with a custom formatter, but it is a lot of work and not a lot of docs.
I believe one has to write a
FormatEvent
viaSubscriberBuilder::event_format
. One can look at https://github.com/davidbarsky/tracing-glog/ and try to do something similar, but again - it is a lot of work.The text was updated successfully, but these errors were encountered: