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 692301 - info, message messages aren't logged anywhere
info, message messages aren't logged anywhere
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
3.7.x
Other Linux
: Normal minor
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks: 692308
 
 
Reported: 2013-01-22 15:33 UTC by Simon McVittie
Modified: 2013-02-05 04:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Log messages of level MESSAGE, INFO too (1.06 KB, patch)
2013-01-22 15:47 UTC, Simon McVittie
committed Details | Review

Description Simon McVittie 2013-01-22 15:33:34 UTC
gdm logs messages of levels ERROR, CRITICAL, WARNING to syslog (and stderr, via LOG_PERROR). If configured to do so, it also logs messages of level DEBUG to syslog (and stderr). However, there is no way to make it log messages of levels MESSAGE or INFO anywhere.

I don't think gdm ever actually logs such a message, but a library that it uses might conceivably do so. (Also, I'm currently looking into optimizing the startup time of a GNOME 3 environment, and to measure that I need to log a timestamp at the earliest point where the user can interact with gdm; a MESSAGE into syslog seems as good a way as any to achieve that.)
Comment 1 Simon McVittie 2013-01-22 15:47:26 UTC
Created attachment 234112 [details] [review]
Log messages of level MESSAGE, INFO too

Previously, gdm would log messages of levels ERROR, CRITICAL, WARNING,
and optionally also DEBUG, to syslog. This left messages of level
MESSAGE or INFO not logged, and no way to get them logged.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=692301
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Comment 2 Simon McVittie 2013-01-22 17:23:31 UTC
I also notice that gdm translates G_LOG_LEVEL_ERROR to LOG_ERR and G_LOG_LEVEL_CRITICAL to LOG_CRIT. Unfortunately, those are backwards. G_LOG_LEVEL_CRITICAL is short for "critical warning" - more serious than a warning, but less serious than an error - whereas LOG_CRIT is more serious than LOG_ERR.

I think the right mapping would probably be G_LOG_LEVEL_CRITICAL -> LOG_ERR, G_LOG_LEVEL_ERROR -> LOG_CRIT - it's slightly misleading, but I think that's GLib's fault really.

Also, gdm tries to map G_LOG_FLAG_FATAL to LOG_EMERG (which is the highest level of syslog message, for "computer is on fire" situations), but I don't think that will ever work: G_LOG_LEVEL_MASK masks out the FATAL and RECURSION levels, hopefully only leaving exactly one log level.

I wonder whether glib-unix.h should include a syslog handler like gdm's, so gdm doesn't have to invent all this...