GNOME Bugzilla – Bug 692301
info, message messages aren't logged anywhere
Last modified: 2013-02-05 04:27:45 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.)
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>
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...