summaryrefslogtreecommitdiff
path: root/util/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/log.h')
-rw-r--r--util/log.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/util/log.h b/util/log.h
index ea283da7b262..8e85ee620b18 100644
--- a/util/log.h
+++ b/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.
*/