After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 614094 - Add thread id to Hyena.Log when debugging.
Add thread id to Hyena.Log when debugging.
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: 1.x
Assigned To: Ruben Vermeersch
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-27 12:15 UTC by Ruben Vermeersch
Modified: 2010-03-30 06:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add thread id to Hyena.Log when debugging. (1.75 KB, patch)
2010-03-27 12:15 UTC, Ruben Vermeersch
committed Details | Review

Description Ruben Vermeersch 2010-03-27 12:15:32 UTC
This adds the thread id to the Hyena.Log output, which makes it possible to
distinguish from which thread the message originated. This is only shown when
Debugging is enabled, to avoid the overhead during normal usage.
Comment 1 Ruben Vermeersch 2010-03-27 12:15:35 UTC
Created attachment 157272 [details] [review]
Add thread id to Hyena.Log when debugging.
Comment 2 Ruben Vermeersch 2010-03-27 12:19:03 UTC
Sample output:

[1 Debug 13:16:59.467] Starting - Starting cached source: Tripod.Model.LocalFolderPhotoSource/1
[1 Debug 13:16:59.470] Main cache started
[2 Debug 13:16:59.652] Starting folder source: file:///home/ruben/Pictures/
[2 Debug 13:16:59.671] Starting - Library rescan for file:///home/ruben/Pictures/
[2 Debug 13:16:59.812] Finished - Starting cached source: Tripod.Model.LocalFolderPhotoSource/1
[3 Debug 13:17:01.475] Finished - Library rescan for file:///home/ruben/Pictures/

The first number is the thread id, which is immutable during the lifetime of the thread. Very useful when figuring out what happens on which thread.
Comment 3 Gabriel Burt 2010-03-28 18:39:35 UTC
Neat!  I guess #1 will usually/always be the main/gui thread?  Maybe we can add a Log.Debug line to ThreadAssist.InitializeMainThread to be sure.  :)

Commit away.
Comment 4 Ruben Vermeersch 2010-03-29 06:54:50 UTC
Yeah, #1 is the main thread from which the application is started. Will commit soon.
Comment 5 Ruben Vermeersch 2010-03-30 06:28:54 UTC
Comment on attachment 157272 [details] [review]
Add thread id to Hyena.Log when debugging.

Committed!