Opened 13 years ago

Closed 13 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)

log.pthreadid.patch (1.1 KB) - added by anonymous 13 years ago.
log.pthreadid.example (1.1 KB) - added by anonymous 13 years ago.

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by anonymous

Attachment: log.pthreadid.patch added

Changed 13 years ago by anonymous

Attachment: log.pthreadid.example added

comment:1 Changed 13 years ago by cpinkham

Owner: changed from Isaac Richards to cpinkham

comment:2 Changed 13 years ago by cpinkham

Resolution: fixed
Status: newclosed

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."

comment:3 Changed 13 years ago by anonymous

Resolution: fixed
Status: closedreopened

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 Changed 13 years ago by Isaac Richards

Resolution: wontfix
Status: reopenedclosed
Note: See TracTickets for help on using tickets.