GNOME Bugzilla – Bug 752136
[review] support also systemd journald for nm-logging [th/logging-sd-journal-bgo752136]
Last modified: 2015-07-14 16:50:51 UTC
Please review
branch: th/logging-sd-journal-752136
(In reply to Thomas Haller from comment #1) > branch: th/logging-sd-journal-752136 typo: th/logging-sd-journal-bgo752136
> build: detect systemd-journald support + if test "$have_systemd_logind" != "yes"; then + if test "$with_systemd_journal" = "yes"; then s/have_systemd_logind/have_systemd_journal/ > logging: add compile time default for logging.backend configuration I wonder if this is useful now that distros can place default configuration options in /usr/lib. But maybe yes...
(In reply to Beniamino Galvani from comment #3) > > build: detect systemd-journald support > > + if test "$have_systemd_logind" != "yes"; then > + if test "$with_systemd_journal" = "yes"; then > > s/have_systemd_logind/have_systemd_journal/ fixed. > > logging: add compile time default for logging.backend configuration > > I wonder if this is useful now that distros can place default > configuration options in /usr/lib. But maybe yes... IMHO yes. Optimally, you don't need any configuration at all you achieve the default behavior on a distribution. Configuration should only be necessary to get non-defaults. Repushed
Overall looks fine to me, just one question about "logging: add "journal-syslog-style" logging backend to log the old format". What's the use-case for this? Couldn't we just say that if you choose to use systemd logging, you get the structured messages?
(In reply to Dan Williams from comment #5) > Overall looks fine to me, just one question about "logging: add > "journal-syslog-style" logging backend to log the old format". What's the > use-case for this? Couldn't we just say that if you choose to use systemd > logging, you get the structured messages? Our current "syslog" format has information like "[timestamp] file:line [func()]" While I dislike that format because it causes the logging lines no being aligned, it might be better for us when a user reports a logfile. Maybe on Fedora we should keep using "journal-syslog-style" by default. That way, when a user does plain `journalctl` he still gets the well known, more detailed, information.
> build: detect systemd-journald support +if test "$have_systemd_journal" = "yes"; then + AC_SUBST(SYSTEMD_JOURNAL_CFLAGS) + AC_SUBST(SYSTEMD_JOURNAL_LIBS) I'm not sure, but I think these can be omitted as already called by PKG_CHECK_MODULES. I would do this: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?h=bg/audit-bgo749364&id=fdb75a7c754cbab107c0c2b80932810b5eba9c55 > logging: add native systemd-journald support to nm-logging + /* construct a list of all domains (not only the enabled onces). s/onces/ones/ The rest looks good to me.
merged to master: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=59ca132b3aafd7cabcdfe045ac966279c96a92b2