diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-09-17 15:21:00 -0500 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-09-17 15:21:30 -0500 |
commit | 0a244b8ecb6dfcb381fe831dc2aa9bacb2c12975 (patch) | |
tree | fbee0ff17b69ef47510e84912ea003ce1fa6021f /src/journal/journald-server.c | |
parent | 41a5ef639b248aa3d10609d9af5d0043b909d93c (diff) |
journald: log the slice of a process along with each message in _SYSTEMD_SLICE=
Diffstat (limited to 'src/journal/journald-server.c')
-rw-r--r-- | src/journal/journald-server.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index ba211b3724..709fa8b7d0 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -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); } |