diff options
| author | David Lamparter <equinox@diac24.net> | 2021-04-11 18:23:16 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2021-06-18 21:05:21 +0200 |
| commit | c6610ea98f44ed2d5d9556076322d3a6a9023675 (patch) | |
| tree | e1736a7a5f964aeb03424d6b427ee7588f381637 /lib/log_vty.c | |
| parent | 5c58f5d3365276aa3681c8e8a448b3e3ea8669bf (diff) | |
lib: make a few log symbols accessible
Might've made a few things too many `static` there.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/log_vty.c')
| -rw-r--r-- | lib/log_vty.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/log_vty.c b/lib/log_vty.c index 7057a06c51..cbb8de8976 100644 --- a/lib/log_vty.c +++ b/lib/log_vty.c @@ -58,7 +58,7 @@ static struct zlog_cfg_filterfile zt_filterfile = { }, }; -static const char *zlog_progname; +const char *zlog_progname; static const char *zlog_protoname; static const struct facility_map { @@ -95,7 +95,14 @@ static const char * const zlog_priority[] = { "notifications", "informational", "debugging", NULL, }; -static const char *facility_name(int facility) +const char *zlog_priority_str(int priority) +{ + if (priority > LOG_DEBUG) + return "???"; + return zlog_priority[priority]; +} + +const char *facility_name(int facility) { const struct facility_map *fm; @@ -105,7 +112,7 @@ static const char *facility_name(int facility) return ""; } -static int facility_match(const char *str) +int facility_match(const char *str) { const struct facility_map *fm; |
