summaryrefslogtreecommitdiff
path: root/lib/log.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-03-02 15:00:46 -0300
committerRenato Westphal <renatowestphal@gmail.com>2019-03-29 11:32:21 -0300
commit8f88441d717c0ded412543cceabf0ddd93ee9f09 (patch)
tree0a460d2da46a5b910535529c92e8db2fa5ff2a74 /lib/log.c
parent6a534dcafcb623f1b85b5ee2a13c74faab227ced (diff)
parent700e9faa28bbdc3460e1d7aa109b6e4acaf347b3 (diff)
Merge remote-tracking branch 'frr/master' into rip-vrf
Merge commit to solve a bunch of conflicts with other PRs that were merged in the previous weeks. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/log.c')
-rw-r--r--lib/log.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/log.c b/lib/log.c
index 12a1d7fbe0..c424a5bc98 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -29,6 +29,7 @@
#include "memory.h"
#include "command.h"
#include "lib_errors.h"
+#include "lib/hook.h"
#ifndef SUNOS_5
#include <sys/un.h>
@@ -46,6 +47,10 @@
DEFINE_MTYPE_STATIC(LIB, ZLOG, "Logging")
+/* hook for external logging */
+DEFINE_HOOK(zebra_ext_log, (int priority, const char *format, va_list args),
+ (priority, format, args));
+
static int logfile_fd = -1; /* Used in signal handler. */
struct zlog *zlog_default = NULL;
@@ -213,6 +218,9 @@ void vzlog(int priority, const char *format, va_list args)
tsctl.already_rendered = 0;
struct zlog *zl = zlog_default;
+ /* call external hook */
+ hook_call(zebra_ext_log, priority, format, args);
+
/* When zlog_default is also NULL, use stderr for logging. */
if (zl == NULL) {
tsctl.precision = 0;
@@ -1019,6 +1027,7 @@ static const struct zebra_desc_table command_types[] = {
DESC_ENTRY(ZEBRA_RELEASE_LABEL_CHUNK),
DESC_ENTRY(ZEBRA_ADVERTISE_ALL_VNI),
DESC_ENTRY(ZEBRA_ADVERTISE_DEFAULT_GW),
+ DESC_ENTRY(ZEBRA_ADVERTISE_SVI_MACIP),
DESC_ENTRY(ZEBRA_ADVERTISE_SUBNET),
DESC_ENTRY(ZEBRA_LOCAL_ES_ADD),
DESC_ENTRY(ZEBRA_LOCAL_ES_DEL),