Might've made a few things too many `static` there.
Signed-off-by: David Lamparter <equinox@diac24.net>
},
};
-static const char *zlog_progname;
+const char *zlog_progname;
static const char *zlog_protoname;
static const struct facility_map {
"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;
return "";
}
-static int facility_match(const char *str)
+int facility_match(const char *str)
{
const struct facility_map *fm;
extern int log_level_match(const char *s);
extern void log_show_syslog(struct vty *vty);
+extern int facility_match(const char *str);
+extern const char *facility_name(int facility);
+
DECLARE_HOOK(zlog_rotate, (), ());
extern void zlog_rotate(void);
extern "C" {
#endif
+DECLARE_MGROUP(LOG);
+
extern char zlog_prefix[];
extern size_t zlog_prefixsz;
extern int zlog_tmpdirfd;
extern int zlog_instance;
+extern const char *zlog_progname;
struct xref_logmsg {
struct xref xref;
/* Enable or disable 'immediate' output - default is to buffer messages. */
extern void zlog_set_immediate(bool set_p);
+extern const char *zlog_priority_str(int priority);
+
#ifdef __cplusplus
}
#endif
* absolute end.
*/
-DECLARE_MGROUP(LOG);
DEFINE_MGROUP_ACTIVEATEXIT(LOG, "logging subsystem");
DEFINE_MTYPE_STATIC(LOG, LOG_FD, "log file target");