diff options
| author | David Lamparter <equinox@diac24.net> | 2021-03-22 13:45:20 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2021-06-18 20:56:53 +0200 |
| commit | e3daa82c1897c289384988add6932f74b0de4e9e (patch) | |
| tree | 3ee16ff1e19c039e82360a353e11aa753c8c7d23 /lib/zlog.h | |
| parent | ba9256d2d089034e66d7c06734a4495afba9513d (diff) | |
lib: record output argument positions in zlog
printfrr() recently acquired the capability to record start/end of
formatting outputs. Make use of this in the zlog code so logging
targets have access to this information.
(This also records how long the `[XXXXX-XXXXX][EC 9999999]` prefix was
so log targets can choose to skip over it.)
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/zlog.h')
| -rw-r--r-- | lib/zlog.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/zlog.h b/lib/zlog.h index c421c16f38..b463606d97 100644 --- a/lib/zlog.h +++ b/lib/zlog.h @@ -31,6 +31,7 @@ #include "frrcu.h" #include "memory.h" #include "hook.h" +#include "printfrr.h" #ifdef __cplusplus extern "C" { @@ -146,6 +147,9 @@ extern const struct xref_logmsg *zlog_msg_xref(struct zlog_msg *msg); /* pass NULL as textlen if you don't need it. */ extern const char *zlog_msg_text(struct zlog_msg *msg, size_t *textlen); +extern void zlog_msg_args(struct zlog_msg *msg, size_t *hdrlen, + size_t *n_argpos, const struct fmt_outpos **argpos); + /* timestamp formatting control flags */ /* sub-second digit count */ |
