After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728178 - [review] th/nm-logging-glib
[review] th/nm-logging-glib
Status: RESOLVED OBSOLETE
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-04-14 13:04 UTC by Thomas Haller
Modified: 2014-04-24 20:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2014-04-14 13:04:03 UTC
Modify logging via nm-log, so that messages from g_log use the same prefix and add a logging domain GLIB.

Please review
Comment 1 Dan Winship 2014-04-15 22:50:42 UTC
This branch conflicts with danw/errors2 (bug 727764), so we should figure that out. (Right now that bug is just waiting for dcbw to say whether or not to add back the plugin names to their warnings.)
Comment 2 Thomas Haller 2014-04-24 19:47:30 UTC
Current nm-logging has two modes:

- with nm_logging_syslog_openlog():
  - _nm_log() writes to syslog()
  - g_log also redirects to syslog()
- without nm_logging_syslog_openlog():
  - _nm_log() writes with g_log()
  - g_log does what it normally does

this branch changed it, that we always redirect g_log() to _nm_log(), which then either does syslog() or printf().


Another thing is, that some tests us g_test_expect_message() to assert against logged messages. This is only possible with how logging is done currently (without opening syslog_openlog()), and it makes sense.


Most of this branch is therefore obsolete. I took the remaining (useful?) parts and moved them to th/bgo706293_platform_tests (bug 706293).


closing this bug now.