Bug 43881 - Make logging TP components easier
Summary: Make logging TP components easier
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-16 05:10 UTC by Guillaume Desmottes
Modified: 2019-12-09 11:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2011-12-16 05:10:25 UTC
I often find myself needing the full logs of a TP component (generally a CM). I usually manually restart the CM with, say, GABBLE_DEBUG=all GABBLE_LOGFILE=/tmp/gabble.log and then pray to be able to reproduce the issue I noticed.

As a Telepathy developer I'm interested in most CMs and may find myself needing logs from basically as CM. I could tweak my session add define a *_DEBUG and *_LOGFILE variable for any CM but that's kinda lame and doesn't really scale.

So I'm proposing to add a couple of generic TP variables:
- TP_DEBUG : if the CM specific *_DEBUG variable is not present we use this one
- TP_LOGDIR: if the CM specific *_LOGFILE variable is not present, we log the debug output to TP_LOGDIR/$cm-name.log

That way I'd just have to define "TP_DEBUG=all TP_LOGDIR=/tmp/telepathy-logs/" and be done.

Note that would also make debugging easier for bug reporters as they wouldn't have to play with a billion env variables any more.

So, crack or not?
Comment 1 Xavier Claessens 2011-12-16 05:16:32 UTC
A global TP_LOGFILE means every app will output at the same place and messages will be mixed. Maybe TP_LOGDIR and each component will create there its own file?

also only TP_DEBUG=all only really make sense, since if you want specific parts, they are different in each app.

Maybe also TP_PERSIST ?
Comment 2 Xavier Claessens 2011-12-16 05:18:41 UTC
(In reply to comment #1)
> A global TP_LOGFILE means every app will output at the same place and messages
> will be mixed. Maybe TP_LOGDIR and each component will create there its own
> file?

Forget this, I just can't read a friday...
Comment 3 Guillaume Desmottes 2011-12-16 05:19:28 UTC
(In reply to comment #1)
> A global TP_LOGFILE means every app will output at the same place and messages
> will be mixed. Maybe TP_LOGDIR and each component will create there its own
> file?

Very good idea, it's almost like I suggested exactly that. :p

> also only TP_DEBUG=all only really make sense, since if you want specific
> parts, they are different in each app.

Yeah, TP_DEBUG=1 maybe?

> Maybe also TP_PERSIST ?

This one seems a bit less useful to me (you generally use it to debug a specific component) but why not.
Comment 4 Jonny Lamb 2011-12-16 05:57:26 UTC
Sorry, what's wrong with the Debug interface?
Comment 5 Guillaume Desmottes 2011-12-16 06:14:51 UTC
(In reply to comment #4)
> Sorry, what's wrong with the Debug interface?

It's not exactly the same use case. The debug interface and its UI is useful when you know where to look and you notice the issue right away (as it's a ring buffer, the logs disappear after a while). 

But what I want is to be able to log *everything*, including extra stuffs for lower layer. Typically, I'd probably add WOCKY_DEBUG=all to see the raw xmpp data, which are not displayed in empathy-debugger.
Comment 6 GitLab Migration User 2019-12-09 11:22:19 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-spec/issues/164.


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.