diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-08-29 22:08:19 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-08-29 22:08:19 +0200 |
commit | 990a1abae249a52eed6fa6489d54873726510620 (patch) | |
tree | 804d99b7659f339ae7ef27139eb2bb477d684be4 /src | |
parent | 6b3fd98f7a8eb4adbc134797fb2e81a643004e0d (diff) |
logind: downgrade session create/remove log messages to LOG_DEBUG for
cronjobs and similar which have no tty/X11 server assigned
https://bugzilla.redhat.com/show_bug.cgi?id=727315
Diffstat (limited to 'src')
-rw-r--r-- | src/logind-session.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/logind-session.c b/src/logind-session.c index 011fc8f5b5..b0a09e3d37 100644 --- a/src/logind-session.c +++ b/src/logind-session.c @@ -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); |