Closed fawdlstty closed 5 months ago
@fawdlstty if you would like to open a PR to add an additional format parameter I would be open to accepting it.
I want to change the meaning of the formatting parameter i
to get it under linux using SYS_gettid
. Do you agree or disagree?
@fawdlstty im not open to changing current functionality, but i would be open to adding a format parameter.
But the current function of the i
and I
formatting parameters is the same. What I want is that without adding new parameters, the new function and the old function can be used normally
@fawdlstty just because is a solution is right for your use case it does not mean it is right for others. In case i wasn't clear the two other times, I will not accept a change and will not continue to discuss it.
To solve your issue I would suggest calling gettid in your application code and logging it as part of the message body.
I'm sorry. Because of I firmly believe that the existing way of getting thread ids is useless under linux, and for that I want disruptive changes. Adding a new formatting parameter would confuse usage, so I also don't think it's necessary to add new formatting parameters for a particular unexpected use case. Therefore, I am obsessed with modifying the existing formatting parameters. I respect your choice not to change, and I hope you'll forgive my offense.
Linux cannot obtain the real thread ID through configuration because the thread id library uses
libc::pthread_self
instead oflibc::syscall(libc::SYS_gettid)
. The author seems unwilling to make changes and suggests replacing the thread id library ref: https://github.com/ruuda/thread-id/pull/16