aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/virtiofsd/passthrough_ll.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index ff6910fd73..f08324f000 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd/passthrough_ll.c
@@ -43,6 +43,7 @@
#include <cap-ng.h>
#include <dirent.h>
#include <errno.h>
+#include <glib.h>
#include <inttypes.h>
#include <limits.h>
#include <pthread.h>
@@ -2268,10 +2269,17 @@ static void setup_nofile_rlimit(void)
static void log_func(enum fuse_log_level level, const char *fmt, va_list ap)
{
+ g_autofree char *localfmt = NULL;
+
if (current_log_level < level) {
return;
}
+ if (current_log_level == FUSE_LOG_DEBUG) {
+ localfmt = g_strdup_printf("[ID: %08ld] %s", syscall(__NR_gettid), fmt);
+ fmt = localfmt;
+ }
+
if (use_syslog) {
int priority = LOG_ERR;
switch (level) {