summaryrefslogtreecommitdiffstats
path: root/lib/zlog.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2021-04-11 04:00:08 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2021-06-18 21:05:21 +0200
commit5c58f5d3365276aa3681c8e8a448b3e3ea8669bf (patch)
tree57c3cbb1216c770f8ac6b0783fe71ca1b6377c83 /lib/zlog.c
parentlib: cache PID & TID in zlog code (diff)
downloadfrr-5c58f5d3365276aa3681c8e8a448b3e3ea8669bf.tar.xz
frr-5c58f5d3365276aa3681c8e8a448b3e3ea8669bf.zip
lib: save instance number in zlog
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/zlog.c')
-rw-r--r--lib/zlog.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/zlog.c b/lib/zlog.c
index d44add48b..6fd52cae6 100644
--- a/lib/zlog.c
+++ b/lib/zlog.c
@@ -67,6 +67,7 @@ DEFINE_HOOK(zlog_aux_init, (const char *prefix, int prio_min),
char zlog_prefix[128];
size_t zlog_prefixsz;
int zlog_tmpdirfd = -1;
+int zlog_instance = -1;
static atomic_bool zlog_ec = true, zlog_xid = true;
@@ -885,6 +886,7 @@ void zlog_init(const char *progname, const char *protoname,
{
zlog_uid = uid;
zlog_gid = gid;
+ zlog_instance = instance;
if (instance) {
snprintfrr(zlog_tmpdir, sizeof(zlog_tmpdir),