gnucash maint: Fix qoflog's comments to reflect a preference for the macros over GLib functions.

John Ralls jralls at code.gnucash.org
Tue Sep 14 18:59:09 EDT 2021


Updated	 via  https://github.com/Gnucash/gnucash/commit/824b5154 (commit)
	from  https://github.com/Gnucash/gnucash/commit/74d06308 (commit)



commit 824b515430230b1ccdf50d483bd131eb2033e5a0
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Sep 14 15:59:01 2021 -0700

    Fix qoflog's comments to reflect a preference for the macros over GLib functions.

diff --git a/bindings/core-utils.i b/bindings/core-utils.i
index bd066cecb..e5cd3cf54 100644
--- a/bindings/core-utils.i
+++ b/bindings/core-utils.i
@@ -93,7 +93,7 @@ gchar * gnc_build_reports_path(const gchar *);
 void gnc_scm_log_warn(const gchar *);
 void gnc_scm_log_error(const gchar *);
 void gnc_scm_log_msg(const gchar *);
-void gnc_scm_loDEBUG(const gchar *);
+void gnc_scm_log_debug(const gchar *);
 
 %newobject gnc_utf8_strip_invalid_strdup;
 gchar * gnc_utf8_strip_invalid_strdup(const gchar *);
diff --git a/libgnucash/engine/qoflog.h b/libgnucash/engine/qoflog.h
index cf1ee5535..2597e9d8f 100644
--- a/libgnucash/engine/qoflog.h
+++ b/libgnucash/engine/qoflog.h
@@ -73,10 +73,11 @@
  *   @c "gnc.gui.plugin-pages.sx-list" or
  *   @c "gnc.register.gnome.cell.quickfill" are
  *   good examples.
- * @li Use glib-provided @c DEBUG(...), @c PINFO(...),
- *   @c g_warning(...), @c g_critical(...) and
- *   @c g_error(...) functions in preference to the historical qof/gnc @c
- *   PINFO, @c PERR (&c.) macros
+ * @li Prefer the macros defined here (PERR, PWARN, PINFO, etc.) to
+ *   the GLib-provided functions that they wrap because it allows us to
+ *   more easily replace the GLib logging functinos with another
+ *   implementation and besides our macros are able to short-circuit
+ *   GLib's rather slow domain and level matching.
  *
  * @see qof_log_parse_log_config(const char*)
  **/



Summary of changes:
 bindings/core-utils.i      | 2 +-
 libgnucash/engine/qoflog.h | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)



More information about the gnucash-changes mailing list