journalctl: Make journalctl --user-unit= match on _SYSTEMD_USER_SLICE
journalctl --unit= already did this, and allows you to tail all the logs for a certain slice easily. It seemed only natural to make --user-unit behave in a similar way. The _SYSTEMD_USER_SLICE field was not documented as being added by journald, so I have added that to the documentation too. Furthermore, I have documented the existing behaviour of --unit= and the new behaviour of --user-unit= The behaviour was actually not documented before, so I am also OK with removing the match for the --unit= command instead. The user would then have to manually provide _SYSTEMD_SLICE= filter to journalctl in both cases. Both options work for me.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
23f8fbb303
commit
0e4a4f56be
@@ -1539,7 +1539,8 @@ static int get_possible_units(
|
||||
"_SYSTEMD_USER_UNIT\0" \
|
||||
"USER_UNIT\0" \
|
||||
"COREDUMP_USER_UNIT\0" \
|
||||
"OBJECT_SYSTEMD_USER_UNIT\0"
|
||||
"OBJECT_SYSTEMD_USER_UNIT\0" \
|
||||
"_SYSTEMD_USER_SLICE\0"
|
||||
|
||||
static int add_units(sd_journal *j) {
|
||||
_cleanup_strv_free_ char **patterns = NULL;
|
||||
|
||||
Reference in New Issue
Block a user