tracing
tracing copied to clipboard
subscriber: add with_binary_name and with_process_id options.
Motivation
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 #2447.
Solution
Implement these two options.
I was going back and forth on whether to put the binary name and pid before or after the log level on the line. I think I'm leaning towards before (so right after the timestamp) currently, but what do you think?
I'd love to see this merged. Can I help promote this somehow?
I think it's a useful feature to have
Is this planned to be merged anytime soon? I'd like to switch to tracing but we also merge logs of multiple applications and need to see the application name as part of the log.
No strong opinion on the order, but if you are showing multiple application logs in one terminal IMHO it's nicer if the order is Timestamp Loglevel <anything else>
because the loglevel and timestamp will always be the same length and aligned on every line, so it's easier on the eye to scan for error, warn etc.
That's actually a good point @gz! Let's do it like that then.
Addressed comments, went back to Timestamp Loglevel <anything else>
, rebased. I assume I should backport this to the v0.1 branch in a followup PR?