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 769507 - gmessages: Don’t require is_journald() call before writer_journald()
gmessages: Don’t require is_journald() call before writer_journald()
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-08-04 09:42 UTC by Philip Withnall
Modified: 2016-08-04 13:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gmessages: Don’t require is_journald() call before writer_journald() (1.62 KB, patch)
2016-08-04 09:42 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2016-08-04 09:42:45 UTC
Patch attached.
Comment 1 Philip Withnall 2016-08-04 09:42:48 UTC
Created attachment 332707 [details] [review]
gmessages: Don’t require is_journald() call before writer_journald()

g_log_writer_is_journald() works out whether the process’ stderr or
stdout are redirected to journald. While the default writer function
uses this in conjunction with g_log_writer_journald(), that does not
always have to be the case — other writer functions might want to always
write to the journal, and never write to stderr (for example).

Consequently, automatically open the journal socket in
writer_journald(), rather than is_journald().
Comment 2 Colin Walters 2016-08-04 11:14:56 UTC
Review of attachment 332707 [details] [review]:

LGTM
Comment 3 Philip Withnall 2016-08-04 13:33:51 UTC
Attachment 332707 [details] pushed as 5c3205f - gmessages: Don’t require is_journald() call before writer_journald()