[Bug 41199] [patch] Enhance logging system

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Sep 26 09:07:09 CEST 2011


Olli Salli <ollisal at gmail.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |ASSIGNED
  Status Whiteboard|                            |review-
           Keywords|                            |patch
         AssignedTo|telepathy-bugs at lists.freede |daniele.domenichelli at gmail.
                   |sktop.org                   |com
                 CC|                            |ollisal at gmail.com

--- Comment #1 from Olli Salli <ollisal at gmail.com> 2011-09-26 00:07:09 PDT ---
Initially commented on this on IRC, attempting to use gkiagia as a proxy, but
then read your line about this bug :)

09:44 < oggis_> ... that looks somewhat useful, but you can only do limited
things with it, especially because it has to return the debug object by-value,
so any arbitrary QDebug subclass of yours is going to be sliced into a base
09:45 < oggis_> so also, this tpDebugCallback proposed would actually lose the
KDebug part of the constructed debug object and it'd turn into a bare QDebug
instead (however much that matters)
09:51 < oggis_> ... and I don't understand at all what's the problem about
changing them wrt enabledDebug/enabledWarning - the ABI they need to maintain
is their function signature, and they would do that just fine by starting to
construct a Tp::Debug which has a QDebug pushing stuff to a string - it's still
a Debug which they can use to have their debug messages go somewhere, just the
internal QDebug object is changed a bit
09:51 < oggis_> then, the debug dtor would relay that to the callback (one has
to move the dtor impl to the .cpp though)

Perhaps better would actually be to call to a enabledDebug() - style function
in the dtor, but still mostly implement it in the private header. This fn would
dig the callback from the static variable and pass the string and type there,
if there is a callback.

Some other things:

typedef QDebug (*debugCallbackType)(QtMsgType type);

We name all types InThisFashion. This one would be Tp::DebugCallback then - and
with the lot more flexible string passing approach, that'd be:

typedef void (*DebugCallback)(QtMsgType type, const QString &message);

Called by the Tp::Debug dtor via a exported (but not declared in an installed
header) function looking at the static var holding it. It has to be exported so
that the inlined Tp::Debug dtor invoc in tp-qt4-farsight can use it too, just
like enabledDebug() & enabledWarning().

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the telepathy-bugs mailing list