summaryrefslogtreecommitdiffstats
path: root/lib/zlog.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2021-04-08 14:28:43 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2021-06-18 21:05:21 +0200
commit243ff228a9b4b680c2c405320634f4f72c65191c (patch)
treecf0b77560a89a8d2a691f748bc30e7f7f2a3c5ea /lib/zlog.h
parentlib: use fbuf for zlog_msg_ts() (diff)
downloadfrr-243ff228a9b4b680c2c405320634f4f72c65191c.tar.xz
frr-243ff228a9b4b680c2c405320634f4f72c65191c.zip
lib: add RFC3164 logging timestamps
This is old-style syslog, used among other things for /dev/log. Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/zlog.h')
-rw-r--r--lib/zlog.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/zlog.h b/lib/zlog.h
index 452dbcbd0..f71d28c99 100644
--- a/lib/zlog.h
+++ b/lib/zlog.h
@@ -168,6 +168,10 @@ extern void zlog_msg_args(struct zlog_msg *msg, size_t *hdrlen,
extern size_t zlog_msg_ts(struct zlog_msg *msg, struct fbuf *out,
uint32_t flags);
+/* "mmm dd hh:mm:ss" for RFC3164 syslog. Only ZLOG_TS_UTC for flags. */
+extern size_t zlog_msg_ts_3164(struct zlog_msg *msg, struct fbuf *out,
+ uint32_t flags);
+
/* This list & struct implements the actual logging targets. It is accessed
* lock-free from all threads, and thus MUST only be changed atomically, i.e.
* RCU.