GNOME Bugzilla – Bug 723926
Reimplement GOA logging in terms of GLib logging
Last modified: 2014-02-10 10:40:04 UTC
In addition to simplifying the code, this ensures that G_MESSAGES_DEBUG is honored, which in turn shuts up the logging of debug messages by default, and avoids filling the journal of everyone who's running a recent dbus-daemon.
Created attachment 268529 [details] [review] Reimplement GOA logging in terms of GLib logging
Review of attachment 268529 [details] [review]: ::: src/goabackend/goalogging.c @@ +197,3 @@ + _color_get (_COLOR_FG_MAGENTA), _color_get (_COLOR_BOLD_ON), thread_str, _color_get (_COLOR_RESET), + message, + _color_get (_COLOR_FG_BLACK), location, function, _color_get (_COLOR_RESET)); Looks like g_log can not colour the output using terminal escape sequences? Maybe we should just kill goalogging.[ch] and directly use g_debug, g_warning, etc..
Created attachment 268597 [details] [review] Replace GOA logging with GLib logging In addition to simplifying the code, this ensures that G_MESSAGES_DEBUG is honored, which in turn shuts up the logging of debug messages by default, and avoids filling the journal of everyone who's running a recent dbus-daemon. The following map was used when converting log levels: - debug -> debug - notice -> message - info -> info - warning -> warning - error -> critical (because g_error() aborts the application) Ok, so this is the more invasive patch that replaces all goa_log() calls with the equivalent glib calls. In addition to color, we lose also function and line reference, but I don't believe this is a huge problem.
Review of attachment 268597 [details] [review]: Looks good to me, apart from a few alignment issues caused by s/goa/g/. I will fix them locally and commit. ::: doc/goa-sections.txt @@ -1074,3 @@ -</SECTION> - -<SECTION> Thanks for taking care of the documentation.
Created attachment 268652 [details] [review] Replace GOA logging with GLib logging