[glib: 1/2] gmessages: Document that using a custom log writer disables fatal handling




commit b4023163ee21d4c2e8d0570de17435020d6b34f1
Author: Guido Günther <agx sigxcpu org>
Date:   Mon Oct 5 11:16:49 2020 +0200

    gmessages: Document that using a custom log writer disables fatal handling
    
    Document that structured logging interwines fatal handling and logging
    so replacing the log handler can have undesired effects.

 glib/gmessages.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/glib/gmessages.c b/glib/gmessages.c
index eb814cfeb..0fde49f44 100644
--- a/glib/gmessages.c
+++ b/glib/gmessages.c
@@ -2606,6 +2606,10 @@ log_is_old_api (const GLogField *fields,
  * messages unless their log domain (or `all`) is listed in the space-separated
  * `G_MESSAGES_DEBUG` environment variable.
  *
+ * g_log_writer_default() uses the mask set by g_log_set_always_fatal() to
+ * determine which messages are fatal. When using a custom writer func instead it is
+ * up to the writer function to determine which log messages are fatal.
+ *
  * Returns: %G_LOG_WRITER_HANDLED on success, %G_LOG_WRITER_UNHANDLED otherwise
  * Since: 2.50
  */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]