Bug 26597

Summary: Debug output is not exposed over dbus.
Product: Telepathy Reporter: Eitan Isaacson <eitan.isaacson>
Component: mission-controlAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: git master   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Quick fix
Quick fix
Quick fix
Use telepathy debug interface

Description Eitan Isaacson 2010-02-16 17:39:08 UTC
Created attachment 33346 [details] [review]
Quick fix

Debug output does not appear in /org/freedesktop/Telepathy/debug. The DEBUG() macro simply calls g_debug directly.
Comment 1 Jonny Lamb 2010-02-16 17:52:19 UTC
Why the empty domain when calling tp_debug_sender_add_message?

Also there are a few style tweaks to fix:

+mcd_debug(const gchar *format,

+void mcd_debug(const gchar *format, ...);

Other than that, looks good to me. Pretty lolz I forgot to do this when writing the initial MC debug patch though! Thanks!
Comment 2 Eitan Isaacson 2010-02-16 18:01:38 UTC
I didn't see domains really in use in MC. I was going to open another bug for that.
Comment 3 Eitan Isaacson 2010-02-16 18:03:46 UTC
Created attachment 33347 [details] [review]
Quick fix

Fixed style.
Comment 4 Eitan Isaacson 2010-02-16 18:14:35 UTC
Created attachment 33348 [details] [review]
Quick fix

Oops! Maybe I should have just made a git branch instead of all this stupid spam.
Comment 5 Jonny Lamb 2010-02-17 07:57:30 UTC
(In reply to comment #2)
> I didn't see domains really in use in MC. I was going to open another bug for
> that.

I admit that you *can* put "$domain/$category" in that string, as tp-glib and gabble do, but as you said, MC doesn't use debug categories. We can easily ignore this though.

The solution to this is to set G_LOG_DOMAIN to "mcd" in src/Makefile.am, and then use that as the domain, just like all the other Telepathy components do.
Comment 6 Eitan Isaacson 2010-02-18 16:16:03 UTC
As promised, I opened another bug for proper flag/category support, bug 26642. It adds the right domain string to the dbus iface too.
Comment 7 Jonny Lamb 2010-02-18 16:33:33 UTC
This problem is not blocked on the said bug; we can work without categories pretty easily.
Comment 8 Eitan Isaacson 2010-02-18 17:20:18 UTC
Created attachment 33406 [details] [review]
Use telepathy debug interface
Comment 9 Simon McVittie 2010-02-19 02:16:29 UTC
I notice your branch related to this removes an extern function. Please don't do that (it would break osso-mission-control on Maemo unless this function is unused, and I happen to know that mcd_debug_set_level() is called by osso-mission-control).
Comment 10 Jonny Lamb 2010-02-19 05:08:16 UTC
(In reply to comment #8)
> Created an attachment (id=33406) [details]
> Use telepathy debug interface

Yeah, this looks alright if it works; I've not actually tested it.

Get mergin'!
Comment 11 Eitan Isaacson 2010-02-19 14:37:08 UTC
Jonny,

Could you commit this? I don't have write access to tp git stuff yet.

Just 'git apply' the above and sign it off.

Thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.