[glib] gmessages: Document namespacing recommendation for structured log fields
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gmessages: Document namespacing recommendation for structured log fields
- Date: Sun, 17 Jul 2016 16:11:33 +0000 (UTC)
commit 12acd90d8a9c728aac621a3103c3d84e6c98c81c
Author: Philip Withnall <philip withnall collabora co uk>
Date: Sun Jul 17 17:10:41 2016 +0100
gmessages: Document namespacing recommendation for structured log fields
We recommend that all custom log fields are namespaced to avoid
collisions.
https://bugzilla.gnome.org/show_bug.cgi?id=744456
glib/gmessages.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/glib/gmessages.c b/glib/gmessages.c
index dd7e597..bcfe534 100644
--- a/glib/gmessages.c
+++ b/glib/gmessages.c
@@ -1311,7 +1311,9 @@ color_reset (gboolean use_color)
* structured data, use g_log_structured_array(). The keys for structured data
* should follow the [systemd journal
* fields](https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html)
- * specification.
+ * specification. It is suggested that custom keys are namespaced according to
+ * the code which sets them. For example, custom keys from GLib all have a
+ * `GLIB_` prefix.
*
* The @log_domain will be converted into a `GLIB_DOMAIN` field. @log_level will
* be converted into a `PRIORITY` field. @format will have its placeholders
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]