diff options
Diffstat (limited to 'lib/zlog_live.h')
| -rw-r--r-- | lib/zlog_live.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/lib/zlog_live.h b/lib/zlog_live.h index c948baeab1..55e60ae674 100644 --- a/lib/zlog_live.h +++ b/lib/zlog_live.h @@ -20,13 +20,42 @@ #include "printfrr.h" struct zlog_live_hdr { + /* timestamp (CLOCK_REALTIME) */ uint64_t ts_sec; uint32_t ts_nsec; + + /* length of zlog_live_hdr, including variable length bits and + * possible future extensions - aka start of text + */ + uint32_t hdrlen; + + /* process & thread ID, meaning depends on OS */ + int64_t pid; + int64_t tid; + + /* number of lost messages due to best-effort non-blocking mode */ + uint32_t lost_msgs; + /* syslog priority value */ uint32_t prio; + /* flags: currently unused */ uint32_t flags; + /* length of message text - extra data (e.g. future key/value metadata) + * may follow after it + */ uint32_t textlen; + /* length of "[XXXXX-XXXXX][EC 0] " header; consumer may want to skip + * over it if using the raw values below. Note that this text may be + * absent depending on "log error-category" and "log unique-id" + * settings + */ + uint32_t texthdrlen; + + /* xref unique identifier, "XXXXX-XXXXX\0" = 12 bytes */ + char uid[12]; + /* EC value */ + uint32_t ec; - uint32_t arghdrlen; + /* recorded printf formatting argument positions (variable length) */ uint32_t n_argpos; struct fmt_outpos argpos[0]; }; @@ -41,6 +70,7 @@ struct zlog_live_cfg { extern void zlog_live_open(struct zlog_live_cfg *cfg, int prio_min, int *other_fd); +extern void zlog_live_open_fd(struct zlog_live_cfg *cfg, int prio_min, int fd); static inline bool zlog_live_is_null(struct zlog_live_cfg *cfg) { |
