Opened 20 years ago
Closed 20 years ago
#1344 closed patch (wontfix)
Patch to add threadid in log messages
| Reported by: | anonymous | Owned by: | cpinkham |
|---|---|---|---|
| Priority: | minor | Milestone: | unknown |
| Component: | mythtv | Version: | |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
Attached is a patch to add the pthread_id of the thread calling the log functionality (the VERBOSE macro). This makes detecting thread interactions in log files a lot easier. I've also attached a snippet of what the log looks like.
HTH, Bill
Attachments (2)
Change History (6)
by , 20 years ago
| Attachment: | log.pthreadid.patch added |
|---|
by , 20 years ago
| Attachment: | log.pthreadid.example added |
|---|
comment:1 by , 20 years ago
| Owner: | changed from to |
|---|
comment:2 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:3 by , 20 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
The LOC, LOC_ERR and LOC_WARN macros are useful for what they're designed for -- noting the function / module that is currently being executed.
This patch shows the thread that is executing the above mentioned functions / modules -- it works in concert with the macros to show the interactions between the different threads which are running. This is especially useful when you get into cases where multiple threads act on the same resource at the same time without proper synchronization (mutexes), resulting in either bad data or a segfault. This adds more info for debugging the segfault.
comment:4 by , 20 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | reopened → closed |

With the various LOC, LOC_ERR, and LOC_WARN macros used in existing VERBOSE logging, there isn't much need for this. Marking this as "won't fix", just because there's not a "not required."