diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-12-15 22:03:33 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-15 22:03:33 +0900 |
commit | b3f1afc08910044f2f55188c266264738a538d10 (patch) | |
tree | 6ecceab84c81fb20f9544bb85c1409947d609670 /src/shared/bus-unit-util.c | |
parent | 0969bb4246acdac8ef91ad99515ae75fe3da734b (diff) | |
parent | 1c9c6fc7dfdaa8fa29d1adeeacafc2450cc86e30 (diff) | |
download | systemd-b3f1afc08910044f2f55188c266264738a538d10.tar.gz |
Merge pull request #24058 from qdeslandes/journald_regex_filtering
Allow for journald logs filtering on a per-unit basis
Diffstat (limited to 'src/shared/bus-unit-util.c')
-rw-r--r-- | src/shared/bus-unit-util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c index 7d136df2d9..7154c9b4c0 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c @@ -1218,6 +1218,16 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con return 1; } + if (streq(field, "LogFilterPatterns")) { + r = sd_bus_message_append(m, "(sv)", "LogFilterPatterns", "a(bs)", 1, + eq[0] != '~', + eq[0] != '~' ? eq : eq + 1); + if (r < 0) + return bus_log_create_error(r); + + return 1; + } + if (STR_IN_SET(field, "StandardInput", "StandardOutput", "StandardError")) { |