Summary: | Use convenience methods of TpDebugSender | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Mikhail Zabaluev <mikhail.zabaluev> |
Component: | rakia | Assignee: | Mikhail Zabaluev <mikhail.zabaluev> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | enhancement | ||
Priority: | medium | CC: | david.laban, pekka.pessi |
Version: | git master | Keywords: | patch |
Hardware: | All | ||
OS: | All | ||
URL: | http://cgit.freedesktop.org/~zabaluev/telepathy-rakia/log/?h=debug-lite | ||
Whiteboard: | review+ | ||
i915 platform: | i915 features: | ||
Bug Depends on: | 33660 | ||
Bug Blocks: |
Description
Mikhail Zabaluev
2011-02-04 06:06:07 UTC
In fact, the new utilities only let me remove some code in Rakia. Repurposing this bug to clean up logging in telepathy-rakia, for which I have a branch up. Formatting is still not avoided even if all logging is disabled. Note that the branch removes these public functions from rakia/debug.h: rakia_sofia_log_init () rakia_sofia_log_finalize (gpointer logdata) (In reply to comment #2) > Formatting is still not avoided even if all logging is disabled. commit 5d568b09068ee1705ed1e35f12044f97e5a1ee85 fixes this, too. Can we have a few tests for this please? I'm really bored of this breaking all the time. I think this looks mostly sane. I will take a look at the test situation when I get time. Minimum requirements should be that distcheck passes with ENABLE_DEBUG set to false, and telepathy-gabble/tests/twisted/test-debug.py is imported into rakia. These are the two tests that gabble does. If you can think of more then do tell. Okay, so I added test-debug from gabble and made it a bit stricter http://cgit.freedesktop.org/~alsuren/telepathy-rakia/log/?h=test-debug. On origin/master, distcheck (with debugging disabled) fails (kind-of as expected). I then merged your branch into mine (with a billion conflicts because of my rename :( ) and distcheck failed. This was mostly because you fail to do: #define DEBUG(format, ...) G_STMT_START { } G_STMT_END to make it swallow the macro args properly (this is what gabble does) and then there were a few unused variable definitions that needed #ifdefing. I fixed this in http://cgit.freedesktop.org/~alsuren/telepathy-rakia/log/?h=test-debug-lite Taking a look at your code again, there are a few niggles that I fixed in my merge/post-merge commits, but: - DEBUG ("Couldn't resolv STUN server address, ignoring."); + MESSAGE ("could not resolve STUN server address, ignoring"); Is there any reason why you decided to break the case/punctuation in that debug message? Would it be better to instead standardise on correct case/punctuation in all debug messages? Also, I don't like this: { "created", - "invite-sent", - "invite-received", - "response-received", + "invi-sent", + "invi-recv", + "resp-recv", "active", - "reinvite-sent", - "reinvite-received", - "reinvite-pending", + "rein-sent", + "rein-recv", + "rein-pend", "ended" }; so I reverted it. Annoyingly, my merge commit makes gitg segfault. If you want to rebase your branch and check that it's all correct using git diff then that might be a good solution. Otherwise, I can try to fix gitg. (In reply to comment #7) > http://cgit.freedesktop.org/~alsuren/telepathy-rakia/log/?h=test-debug-lite Thank you. I have pulled that, updated with latest changes in master and added some more polish: http://cgit.freedesktop.org/~zabaluev/telepathy-rakia/log/?h=debug-lite I made sure it passes distcheck this time. Looks good. Ship it. Merged and pushed into master. Released with telepathy-rakia 0.7.2. |
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.