summaryrefslogtreecommitdiff
path: root/usr.sbin/unbound/util/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/unbound/util/log.h')
-rw-r--r--usr.sbin/unbound/util/log.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr.sbin/unbound/util/log.h b/usr.sbin/unbound/util/log.h
index ea283da7b26..8e85ee620b1 100644
--- a/usr.sbin/unbound/util/log.h
+++ b/usr.sbin/unbound/util/log.h
@@ -98,6 +98,15 @@ void log_file(FILE *f);
void log_thread_set(int* num);
/**
+ * Get the thread id from logging system. Set after log_init is
+ * initialised, or log_thread_set for newly created threads.
+ * This initialisation happens in unbound as a daemon, in daemon
+ * startup code, when that spawns threads.
+ * @return thread number, from 0 and up. Before initialised, returns 0.
+ */
+int log_thread_get(void);
+
+/**
* Set identity to print, default is 'unbound'.
* @param id: string to print. Name of executable.
*/