summaryrefslogtreecommitdiff
path: root/src/login/logind-seat.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-08-24 22:21:20 +0200
committerLennart Poettering <lennart@poettering.net>2012-09-03 18:59:04 -0700
commit877d54e9b09e093c2102f519a84e2a52637ae035 (patch)
treeff7926d33cd29b9e2930cb401a7be412c7724241 /src/login/logind-seat.c
parent88fae6e0441d4195e089434f07d3e7fd811d6297 (diff)
journal: generate structured journal messages for a number of events
Diffstat (limited to 'src/login/logind-seat.c')
-rw-r--r--src/login/logind-seat.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
index 045712192..937315ebf 100644
--- a/src/login/logind-seat.c
+++ b/src/login/logind-seat.c
@@ -27,6 +27,8 @@
#include <linux/vt.h>
#include <string.h>
+#include "systemd/sd-id128.h"
+#include "systemd/sd-messages.h"
#include "logind-seat.h"
#include "logind-acl.h"
#include "util.h"
@@ -337,7 +339,11 @@ int seat_start(Seat *s) {
if (s->started)
return 0;
- log_info("New seat %s.", s->id);
+ log_struct(LOG_INFO,
+ "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(SD_MESSAGE_SEAT_START),
+ "SEAT_ID=%s", s->id,
+ "MESSAGE=New seat %s.", s->id,
+ NULL);
/* Initialize VT magic stuff */
seat_preallocate_vts(s);
@@ -361,7 +367,11 @@ int seat_stop(Seat *s) {
assert(s);
if (s->started)
- log_info("Removed seat %s.", s->id);
+ log_struct(LOG_INFO,
+ "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(SD_MESSAGE_SEAT_STOP),
+ "SEAT_ID=%s", s->id,
+ "MESSAGE=Removed seat %s.", s->id,
+ NULL);
seat_stop_sessions(s);