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 682794 - Add usage guidance to logging documentation
Add usage guidance to logging documentation
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on: 769486
Blocks:
 
 
Reported: 2012-08-27 11:35 UTC by Philip Withnall
Modified: 2016-08-07 07:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gmessages: Expand documentation on log domains and G_MESSAGES_DEBUG (3.51 KB, patch)
2016-08-03 21:12 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2012-08-27 11:35:35 UTC
It would be useful if the “Message Logging” documentation included guidance on how programs and libraries should implement their logging. For example, should all libraries standardise on using G_MESSAGES_DEBUG, or would it be preferable for them to each have their own environment variable?

If libraries are to have their own environment variables, what’s the recommended way for them to reimplement g_log_default_handler()? Just copy and paste it (plus all of its string escaping code)? What’s the recommended naming scheme for debug environment variables?

What’s the recommended naming scheme for logging domains?
Comment 1 Philip Withnall 2016-08-03 21:12:57 UTC
Created attachment 332684 [details] [review]
gmessages: Expand documentation on log domains and G_MESSAGES_DEBUG

Give some example log domains, and recommend that G_MESSAGES_DEBUG is
used universally as the way to enable debug output (rather than having a
separate environment variable per library).
Comment 2 Matthias Clasen 2016-08-03 22:45:26 UTC
Review of attachment 332684 [details] [review]:

useful, thanks
Comment 3 Philip Withnall 2016-08-07 07:11:11 UTC
Attachment 332684 [details] pushed as 371078b - gmessages: Expand documentation on log domains and G_MESSAGES_DEBUG