Bug 27889 - Use more log levels
Summary: Use more log levels
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/sm...
Whiteboard: r+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-04-29 05:47 UTC by Jonny Lamb
Modified: 2010-06-03 10:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Jonny Lamb 2010-04-29 05:47:00 UTC
I was thinking during doing the debug sender stuff how Telepathy is restricting itself with respect to log levels. Pretty much everywhere just uses DEBUG.

Although I'm not volunteering to go through our CMs and Empathy making sure DEBUGs become more appropriate levels where appropriate, it'd be nice if it was easy to do so with new/modified code.

So I wrote the linked branch against master. Check it out.
Comment 1 Simon McVittie 2010-04-29 06:22:55 UTC
This makes sense, although perhaps gabble_debug() should also be renamed to gabble_log().

Could you do something similar in telepathy-glib's debug-internal.h?

We could benefit from some sort of policy for what level to use where - extremes are Mission Control (which emits a g_warning on some relatively normal conditions, like a channel request failing) and e.g. Gabble (which criticals when API is used wrong, but basically never warns). I think the correct policy is somewhere in between.

(Note that warnings can be made fatal in the environment, which we do in most non-MC regression tests - it'd probably be better for MC to do a MESSAGE or INFO on failed channel requests, for this reason.)
Comment 2 Jonny Lamb 2010-04-29 07:04:58 UTC
(In reply to comment #1)
> This makes sense, although perhaps gabble_debug() should also be renamed to
> gabble_log().

Okay, I've done this.

> Could you do something similar in telepathy-glib's debug-internal.h?

Sure.

I also added another patch to fix the build (when these new macros are actually used) with --disable-debug. Bad me.

So, the two additional commits look okay?
Comment 3 Simon McVittie 2010-04-29 07:45:33 UTC
(In reply to comment #2)
> So, the two additional commits look okay?

They do. Ship it!
Comment 4 Jonny Lamb 2010-04-29 08:50:12 UTC
Merged, will be in next 0.9 release.
Comment 5 Simon McVittie 2010-04-30 08:40:03 UTC
This has the same problems as Bug #27899.
Comment 6 Simon McVittie 2010-04-30 08:43:28 UTC
... and indeed, so does Salut. I don't propose to file a separate bug for Salut.
Comment 7 Simon McVittie 2010-04-30 09:03:14 UTC
I've reverted the Salut patch til we can replace it with something based on this one. Sorry, I should have spotted this at review.
Comment 8 Will Thompson 2010-06-03 10:22:40 UTC
smcv's patch to fix this looks fine, so I have merged it.


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.