summaryrefslogtreecommitdiffstats
path: root/src/journal/journald-context.h
diff options
context:
space:
mode:
authorQuentin Deslandes <qde@naccy.de>2022-09-13 17:15:13 +0200
committerQuentin Deslandes <qde@naccy.de>2022-12-15 10:57:39 +0100
commit87a13dabbd81c2e31fd5ac7b81cce61baf23e59c (patch)
tree83b4ddf0c6602b544ccf97a5110586760b1a5c25 /src/journal/journald-context.h
parentCreate hash_ops structure to free keys of type pcre2_code (diff)
downloadsystemd-87a13dabbd81c2e31fd5ac7b81cce61baf23e59c.tar.xz
systemd-87a13dabbd81c2e31fd5ac7b81cce61baf23e59c.zip
journal: filter log based on LogFilterPatterns
Use LogFilterPatterns from the unit's cgroup xattr in order to keep or discard log messages before writing them to the journal. When a log message is discarded, it won't be written to syslog, console... either. When a native, syslog, or standard output log message is received, systemd-journald will process it if it matches against at least one allowed pattern (if any) and none of the denied patterns (if any).
Diffstat (limited to 'src/journal/journald-context.h')
-rw-r--r--src/journal/journald-context.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/journal/journald-context.h b/src/journal/journald-context.h
index 9bf74b2347..4a998ba42e 100644
--- a/src/journal/journald-context.h
+++ b/src/journal/journald-context.h
@@ -7,6 +7,7 @@
#include "sd-id128.h"
+#include "set.h"
#include "time-util.h"
typedef struct ClientContext ClientContext;
@@ -55,6 +56,9 @@ struct ClientContext {
usec_t log_ratelimit_interval;
unsigned log_ratelimit_burst;
+
+ Set *log_filter_allowed_patterns;
+ Set *log_filter_denied_patterns;
};
int client_context_get(