After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 303000 - Add Glog to Glib
Add Glog to Glib
Status: RESOLVED WONTFIX
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: High critical
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2005-05-04 14:58 UTC by Maciej Katafiasz
Modified: 2011-06-09 19:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Maciej Katafiasz 2005-05-04 14:58:22 UTC
See http://cvs.freedesktop.org/gstreamer/gst-sandbox/glog/ and
http://thread.gmane.org/gmane.comp.gnome.gtk+.devel.general/7631

This bug is here to gather all outstanding issues before Glog can go into Glib,
and to collect wishes that can be implemented after inclusion. If you are adding
blocker issue, please note that in the first line of your comment.
Comment 1 Matthias Clasen 2005-05-17 14:52:49 UTC
I'm not fond of adding a second logging api to glib, when we already have g_log
and friends. Maybe we should discuss what features are missing from g_log that
make it unusable for your case. I can think of a few:

- categories
- a convenient way to filter by severity/category *at runtime*, 
  via a config file or an environment variable
- a convenient way to set up alternative destinations eg a socket
- "extensible printf" functionality for printing custom types

Is this what you are missing ?
Comment 2 Matthias Clasen 2011-06-04 03:05:23 UTC
Clearly not going to happen
Comment 3 Tim-Philipp Müller 2011-06-09 19:20:33 UTC
Just for posterity: the following might give you an idea:

 $ GST_DEBUG=*:3 gst-launch-0.10 v4l2src num-buffers=5 ! ffmpegcolorspace ! xvimagesink

 $ GST_DEBUG=*:2 gst-launch-0.10 v4l2src num-buffers=5 ! ffmpegcolorspace ! xvimagesink

 $ GST_DEBUG=*sink:5 gst-launch-0.10 v4l2src num-buffers=5 ! ffmpegcolorspace ! xvimagesink

(and then *:5 or *:9 for the complete output. Add 2>&1 | less -R to see things in a pager.)

Timing info, process + thread IDs, source filename + line number + function name are extremely useful.

The optional 'object' argument to each debug message is also very useful, printed as '<xvimagesink0>' after the function name for example, though admittedly this is nicer when object actually have names, which GstObjects do, but GObjects do not (yet?).

I know lots of people who would love to see this in GLib and who would use it in their apps and libraries, and I believe there are also folks who'd do the work to integrate it into GLib and fix it up where needed.

Last time the topic came up on the mailing list (a while back) everyone seemed in favour, with only you (IIRC) undecided/unconvinced.

I think these two systems could simply serve slightly different purposes, just like GVariant has its own type system.

Not to say that it's the pinnacle of logging systems, but I think it is much-liked amongst those who've actually used it, and has proven extremely useful when debugging GStreamer applications.