GNOME Bugzilla – Bug 703661
[PATCH] main: If we have systemd, initialize journal here
Last modified: 2013-07-08 15:26:16 UTC
+++ This bug was initially created as a clone of Bug #699785 +++ This is very broken. gnome-session --help's output goes to /var/log/messages (?!) and this makes it impossible to capture gnome-session's output from test suites, such as the one in gnome-settings-daemon. I understand we want the maximum amount of output/debug going to the journal in those cases, but this is a bit over the top.
This breaks the "test_forced_logout" test in gnome-settings-daemon. ====================================================================== FAIL: test_forced_logout (__main__.PowerPluginTest) Test forced logout ---------------------------------------------------------------------- Traceback (most recent call last):
+ Trace 232193
self.check_for_logout(idle_delay + 2)
self.fail('timed out waiting for gnome-session logout call')
---------------------------------------------------------------------- The gnome-session log (from stdout) is completely devoid of content.
Created attachment 248491 [details] [review] 0001-Set-up-systemd-journal-redirection-after-early-optio.patch
Review of attachment 248491 [details] [review]: Works for me, a shame that it wouldn't log the GTK+ init failure to the journal for example but I see no easy way around that (maybe an envvar to set the debug? we initialise GLib/GObject in check_gl() already)
(In reply to comment #3) > Review of attachment 248491 [details] [review]: > > Works for me, a shame that it wouldn't log the GTK+ init failure to the journal > for example but I see no easy way around that (maybe an envvar to set the > debug? we initialise GLib/GObject in check_gl() already) Yeah...a more elegant fix I think is going to have to wait until we figure out how to make GLib out of the box do the right thing. We could provide you a command line option (--enable-testing-mode?) It's a little wrong to hook it off --debug as I have now because gdm will inject that if you enable Debug=true in gdm.conf.
(In reply to comment #3) > Review of attachment 248491 [details] [review]: > > Works for me, a shame that it wouldn't log the GTK+ init failure to the journal > for example but I see no easy way around that (maybe an envvar to set the > debug? we initialise GLib/GObject in check_gl() already) Can we do the dup2(journalfd, 2) early and the dup2(journalfd, 1) late?