From: Lennart Poettering Date: Tue, 14 Jan 2025 11:10:49 +0000 (+0100) Subject: logind: improve log message we generate when a user logs in X-Git-Tag: v258-rc1~1591^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F35987%2Fhead;p=thirdparty%2Fsystemd.git logind: improve log message we generate when a user logs in Mention the session type and class both in the human readable string and in the structured log. --- diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 686041320f3..e8c3ae621b2 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -859,7 +859,13 @@ int session_start(Session *s, sd_bus_message *properties, sd_bus_error *error) { "SESSION_ID=%s", s->id, "USER_ID=%s", s->user->user_record->user_name, "LEADER="PID_FMT, s->leader.pid, - LOG_MESSAGE("New session %s of user %s.", s->id, s->user->user_record->user_name)); + "CLASS=%s", session_class_to_string(s->class), + "TYPE=%s", session_type_to_string(s->type), + LOG_MESSAGE("New session '%s' of user '%s' with class '%s' and type '%s'.", + s->id, + s->user->user_record->user_name, + session_class_to_string(s->class), + session_type_to_string(s->type))); if (!dual_timestamp_is_set(&s->timestamp)) dual_timestamp_now(&s->timestamp);