journald: log the slice of a process along with each message in _SYSTEMD_SLICE=

This commit is contained in:
Lennart Poettering
2013-09-17 15:21:30 -05:00
parent 41a5ef639b
commit 0a244b8ecb
3 changed files with 18 additions and 9 deletions
+6
View File
@@ -638,6 +638,12 @@ static void dispatch_message_real(
IOVEC_SET_STRING(iovec[n++], x);
}
if (cg_path_get_slice(c, &t) >= 0) {
x = strappenda("_SYSTEMD_SLICE=", t);
free(t);
IOVEC_SET_STRING(iovec[n++], x);
}
free(c);
}
+1 -1
View File
@@ -125,7 +125,7 @@ typedef struct Server {
bool sync_scheduled;
} Server;
#define N_IOVEC_META_FIELDS 19
#define N_IOVEC_META_FIELDS 20
#define N_IOVEC_KERNEL_FIELDS 64
#define N_IOVEC_UDEV_FIELDS 32
#define N_IOVEC_OBJECT_FIELDS 11