diff options
author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-06-13 23:15:32 +0200 |
---|---|---|
committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-06-19 23:20:24 +0200 |
commit | c0dc23460ba43192703a3bf76eca08c71257d42c (patch) | |
tree | 921b9ff7ea7239b04e162d18ebae923ef2a9be64 /lib/log.h | |
parent | vtysh: Update vtysh commands with all daemon str (diff) | |
download | frr-c0dc23460ba43192703a3bf76eca08c71257d42c.tar.xz frr-c0dc23460ba43192703a3bf76eca08c71257d42c.zip |
lib: Add log filter manipulation code
Add code for manipulation/creation of log filters
and their table. Specifically, add lookup,clear,add,del,dump
functionality.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'lib/log.h')
-rw-r--r-- | lib/log.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -115,6 +115,15 @@ extern int zlog_reset_file(void); /* Rotate log. */ extern int zlog_rotate(void); +#define ZLOG_FILTERS_MAX 100 /* Max # of filters at once */ +#define ZLOG_FILTER_LENGTH_MAX 80 /* 80 character filter limit */ + +/* Add/Del/Dump log filters */ +extern void zlog_filter_clear(void); +extern int zlog_filter_add(const char *filter); +extern int zlog_filter_del(const char *filter); +extern int zlog_filter_dump(char *buf, size_t max_size); + const char *lookup_msg(const struct message *mz, int kz, const char *nf); /* Safe version of strerror -- never returns NULL. */ |