summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gratton <mike@vee.net>2019-06-29 15:09:27 +1000
committerMichael Gratton <mike@vee.net>2019-06-29 15:12:53 +1000
commit88e56c1ff1eb3b399bfa1f94dbfc589c9c7d6673 (patch)
tree702c5bfb8246d5d94ff786dd004b09b7c9c3c8d8
parentce961e2722a40f0d00bb1f16b14468563324a60f (diff)
downloadglib-wip/mjog/log-structured-example-wrong.tar.gz
g_log_structured_array: Fix example call in docswip/mjog/log-structured-example-wrong
The MESSAGE field must always be last for both g_log_structured and g_log_structured_array, but the code example for the latter shows it first, which is invalid.
-rw-r--r--glib/gmessages.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/glib/gmessages.c b/glib/gmessages.c
index 0210b7a8e..c8bc28c16 100644
--- a/glib/gmessages.c
+++ b/glib/gmessages.c
@@ -1632,10 +1632,10 @@ done_query:
* For example:
* |[<!-- language="C" -->
* const GLogField fields[] = {
- * { "MESSAGE", "This is a debug message.", -1 },
* { "MESSAGE_ID", "fcfb2e1e65c3494386b74878f1abf893", -1 },
* { "MY_APPLICATION_CUSTOM_FIELD", "some debug string", -1 },
* { "MY_APPLICATION_STATE", state_object, 0 },
+ * { "MESSAGE", "This is a debug message.", -1 },
* };
* g_log_structured_array (G_LOG_LEVEL_DEBUG, fields, G_N_ELEMENTS (fields));
* ]|