Make logging TP components easier
@gdesmott
Submitted by Guillaume Desmottes Assigned to Telepathy bugs list
Description
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?