GNOME Bugzilla – Bug 614094
Add thread id to Hyena.Log when debugging.
Last modified: 2010-03-30 06:29:18 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.
Created attachment 157272 [details] [review] Add thread id to Hyena.Log when debugging.
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.
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.
Yeah, #1 is the main thread from which the application is started. Will commit soon.
Comment on attachment 157272 [details] [review] Add thread id to Hyena.Log when debugging. Committed!