main: add --debug, fix logging under systemd
authorDan Winship <danw@gnome.org>
Fri, 17 May 2013 19:18:03 +0000 (15:18 -0400)
committerDan Winship <danw@gnome.org>
Tue, 21 May 2013 12:30:09 +0000 (09:30 -0300)
commit8d44136dce3de1becd11e798edfc3f1eb3f4a36f
tree7fa4698ce75f92f7f053ba9738c5536acaa10581
parent7ff3d1500e8a9dcce4d12b7b879bf1d178b94bf8
main: add --debug, fix logging under systemd

When run with --no-daemon, NM used to duplicate all syslog output to
stderr, for ease of debugging. But this meant it had to tell systemd
to ignore stderr, so you wouldn't get duplicated log entries. But that
meant we lost error messages that didn't go through nm_log. (eg,
g_warning()s and g_return_if_fail()s).

Fix this by making --no-daemon no longer duplicate syslog output to
stderr, and removing the "StandardError=null" from the systemd service
file. To get the old behavior, you can use --debug instead of
--no-daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=700550
data/NetworkManager.service.in
man/NetworkManager.xml
src/logging/nm-logging.c
src/logging/nm-logging.h
src/main.c