summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDamon Chaplin <damon@helixcode.com>2000-06-11 17:28:20 +0000
committerDamon Chaplin <damon@src.gnome.org>2000-06-11 17:28:20 +0000
commit2c4d8d1ae22515cbf1a5fdb48cbe1f90d13d5a3f (patch)
treed22336a92585b259cde72faae0d05c8251aa2cbf /docs
parent5ff84de0df742f66e535f51d3cf5a5b1e1660381 (diff)
downloadglib-2c4d8d1ae22515cbf1a5fdb48cbe1f90d13d5a3f.tar.gz
updated a few bits about log handlers & flags.
2000-06-11 Damon Chaplin <damon@helixcode.com> * tmpl/messages.sgml: updated a few bits about log handlers & flags.
Diffstat (limited to 'docs')
-rw-r--r--docs/reference/ChangeLog4
-rw-r--r--docs/reference/glib/glib/ChangeLog4
-rw-r--r--docs/reference/glib/tmpl/messages.sgml19
3 files changed, 24 insertions, 3 deletions
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog
index 2cf0ed214..cfad12bd0 100644
--- a/docs/reference/ChangeLog
+++ b/docs/reference/ChangeLog
@@ -1,3 +1,7 @@
+2000-06-11 Damon Chaplin <damon@helixcode.com>
+
+ * tmpl/messages.sgml: updated a few bits about log handlers & flags.
+
2000-04-16 Damon Chaplin <damon@helixcode.com>
* tmpl/linked_lists_single.sgml:
diff --git a/docs/reference/glib/glib/ChangeLog b/docs/reference/glib/glib/ChangeLog
index 2cf0ed214..cfad12bd0 100644
--- a/docs/reference/glib/glib/ChangeLog
+++ b/docs/reference/glib/glib/ChangeLog
@@ -1,3 +1,7 @@
+2000-06-11 Damon Chaplin <damon@helixcode.com>
+
+ * tmpl/messages.sgml: updated a few bits about log handlers & flags.
+
2000-04-16 Damon Chaplin <damon@helixcode.com>
* tmpl/linked_lists_single.sgml:
diff --git a/docs/reference/glib/tmpl/messages.sgml b/docs/reference/glib/tmpl/messages.sgml
index 536b8e36c..5fd382d9c 100644
--- a/docs/reference/glib/tmpl/messages.sgml
+++ b/docs/reference/glib/tmpl/messages.sgml
@@ -70,7 +70,8 @@ Specifies the prototype of log handler functions.
</para>
@log_domain: the log domain of the message.
-@log_level: the log level of the message.
+@log_level: the log level of the message (including the fatal and recursion
+flags).
@message: the message to process.
@user_data: user data, set in g_log_set_handler().
@@ -152,11 +153,23 @@ documentation.
<!-- ##### FUNCTION g_log_set_handler ##### -->
<para>
-Sets the log handler for a domain and set of log levels.
+Sets the log handler for a domain and a set of log levels.
+Note that to handle fatal and recursive messages the @log_levels parameter
+must be combined with the G_LOG_FLAG_FATAL and G_LOG_FLAG_RECURSIVE bit flags.
+
+<example>
+<title>Adding a log handler for all warning messages</title>
+<programlisting>
+ g_log_set_handler (NULL, G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
+ | G_LOG_FLAG_RECURSIVE, my_log_handler, NULL);
+</programlisting>
+</example>
</para>
@log_domain: the log domain, or NULL for the default "" application domain.
-@log_levels: the levels to apply the log handler.
+@log_levels: the log levels to apply the log handler for. To handle fatal
+and recursive messages as well, comine the log levels with the G_LOG_FLAG_FATAL
+and G_LOG_FLAG_RECURSIVE bit flags.
@log_func: the log handler function.
@user_data: data passed to the log handler.
@Returns: the id of the new handler.