GNOME Bugzilla – Bug 700550
fix logging under systemd
Last modified: 2013-05-21 12:40:42 UTC
as discussed on irc, see second patch. also danw/log branch
Created attachment 244575 [details] [review] main: make handling of --no-daemon saner by using G_OPTION_FLAG_REVERSED
Created attachment 244576 [details] [review] 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.
Would be nice to announce on the mailing list and possibly also include in release notes. I don't even mention the manual page. And please add a (uppercase) -D as an alias to --debug, if possible.
Created attachment 244802 [details] [review] core: add single-letter command-line flags Add single-letter options for --version, --no-daemon, --debug, and --pid-file (and document them, as well as the existing single-letter option for --help).
Review of attachment 244802 [details] [review]: Nice. I just think more sensible alias for --version is -V (-v for --verbose) and -D for --debug (-d often has a different meaning). But these are cosmetics, of course.
Hm... Running "foreach f in /bin/*; do $f --help ..."[*], I get: 103 -d | --debug 121 -d as debug (without also having --debug) 621 -d as something else 11 -D | --debug 8 -D as debug 174 -D as something else 172 -v | --version 18 -v as version 259 -v as verbose 233 -v as something else 296 -V | --version 22 -V as version 25 -V as verbose 56 -V as something else So looks like you're right about version/verbose, and we should go with -V, but -d is better for debug. [*] Kids, don't try this in $HOME!
(In reply to comment #6) > So looks like you're right about version/verbose, and we should go with -V, but > -d is better for debug. Good, thanks!