]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/log.h
Merge pull request #257 from opensourcerouting/nhrpd
[mirror_frr.git] / lib / log.h
index b5edc75f1639497465b760c4b3d52fb3c5efb73a..00c996c5be27f24aecf5f1ea3c5fff1d1d497631 100644 (file)
--- a/lib/log.h
+++ b/lib/log.h
@@ -24,6 +24,7 @@
 #define _ZEBRA_LOG_H
 
 #include <syslog.h>
+#include <stdio.h>
 
 /* Here is some guidance on logging levels to use:
  *
  * please use LOG_ERR instead.
  */
 
+/*
+ * This must be kept in the same order as
+ * zlog_proto_names[]
+ */
 typedef enum 
 {
   ZLOG_NONE,
@@ -51,9 +56,12 @@ typedef enum
   ZLOG_OSPF,
   ZLOG_RIPNG,
   ZLOG_OSPF6,
+  ZLOG_LDP,
   ZLOG_ISIS,
   ZLOG_PIM,
-  ZLOG_MASC
+  ZLOG_NHRP,
+  ZLOG_RFP,
+  ZLOG_WATCHFRR,
 } zlog_proto_t;
 
 /* If maxlvl is set to ZLOG_DISABLED, then no messages will be sent
@@ -115,12 +123,15 @@ extern void zlog (struct zlog *zl, int priority, const char *format, ...)
   PRINTF_ATTRIBUTE(3, 4);
 
 /* Handy zlog functions. */
+extern void vzlog (struct zlog *zl, int priority, const char *format, va_list args);
 extern void zlog_err (const char *format, ...) PRINTF_ATTRIBUTE(1, 2);
 extern void zlog_warn (const char *format, ...) PRINTF_ATTRIBUTE(1, 2);
 extern void zlog_info (const char *format, ...) PRINTF_ATTRIBUTE(1, 2);
 extern void zlog_notice (const char *format, ...) PRINTF_ATTRIBUTE(1, 2);
 extern void zlog_debug (const char *format, ...) PRINTF_ATTRIBUTE(1, 2);
 
+extern void vzlog (struct zlog *, int , const char *, va_list );
+
 extern void zlog_thread_info (int log_level);
 
 /* Set logging level for the given destination.  If the log_level
@@ -179,6 +190,11 @@ extern size_t quagga_timestamp(int timestamp_precision /* # subsecond digits */,
                               char *buf, size_t buflen);
 
 extern void zlog_hexdump(const void *mem, unsigned int len);
+extern const char *zlog_sanitize(char *buf, size_t bufsz, const void *in, size_t inlen);
+
+
+extern int 
+vzlog_test (struct zlog *zl, int priority);
 
 /* structure useful for avoiding repeated rendering of the same timestamp */
 struct timestamp_control {