summaryrefslogtreecommitdiff
path: root/lib/zlog_targets.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2019-12-17 13:05:32 +0100
committerDavid Lamparter <equinox@diac24.net>2020-04-01 06:53:26 +0200
commit1c4086281f72fd8b6fdf824a6edfaebe1871e383 (patch)
tree32a7b4570fd89f998ebb8d7c8c085d2b1dee9e2f /lib/zlog_targets.h
parent0eb5f93863c40f6ca906bc6273795982c1359efc (diff)
lib/log: re-add log filtering
This is most of the old code bolted on top of the new "backend" infrastructure. It just wraps around zlog_fd() with the string search. Originally-by: Stephen Worley <sworley@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/zlog_targets.h')
-rw-r--r--lib/zlog_targets.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/zlog_targets.h b/lib/zlog_targets.h
index 7d7b26e32b..f95d349a57 100644
--- a/lib/zlog_targets.h
+++ b/lib/zlog_targets.h
@@ -38,6 +38,9 @@ struct zlog_cfg_file {
/* call zlog_file_set_filename/fd() to change this */
char *filename;
int fd;
+
+ void (*zlog_wrap)(struct zlog_target *zt, struct zlog_msg *msgs[],
+ size_t nmsgs);
};
extern void zlog_file_init(struct zlog_cfg_file *zcf);
@@ -48,6 +51,9 @@ extern bool zlog_file_set_filename(struct zlog_cfg_file *zcf, const char *name);
extern bool zlog_file_set_fd(struct zlog_cfg_file *zcf, int fd);
extern bool zlog_file_rotate(struct zlog_cfg_file *zcf);
+extern void zlog_fd(struct zlog_target *zt, struct zlog_msg *msgs[],
+ size_t nmsgs);
+
/* syslog is always limited to one target */
extern void zlog_syslog_set_facility(int facility);