]> err.no Git - systemd/commitdiff
logind: downgrade session create/remove log messages to LOG_DEBUG for
authorLennart Poettering <lennart@poettering.net>
Mon, 29 Aug 2011 20:08:19 +0000 (22:08 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 29 Aug 2011 20:08:19 +0000 (22:08 +0200)
cronjobs and similar which have no tty/X11 server assigned

https://bugzilla.redhat.com/show_bug.cgi?id=727315

src/logind-session.c

index 011fc8f5b55597082f350c54e9ba4ed44509b959..b0a09e3d37ea0e3537da7902c128de129ff3c237 100644 (file)
@@ -536,7 +536,8 @@ int session_start(Session *s) {
         if (r < 0)
                 return r;
 
-        log_info("New session %s of user %s.", s->id, s->user->name);
+        log_full(s->display || s->tty ? LOG_INFO : LOG_DEBUG,
+                 "New session %s of user %s.", s->id, s->user->name);
 
         /* Create cgroup */
         r = session_create_cgroup(s);
@@ -658,7 +659,8 @@ int session_stop(Session *s) {
         assert(s);
 
         if (s->started)
-                log_info("Removed session %s.", s->id);
+                log_full(s->display || s->tty ? LOG_INFO : LOG_DEBUG,
+                         "Removed session %s.", s->id);
 
         /* Kill cgroup */
         k = session_terminate_cgroup(s);