aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/log.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/log.c b/util/log.c
index 39866bd..b7d2b6e 100644
--- a/util/log.c
+++ b/util/log.c
@@ -206,6 +206,11 @@ static bool qemu_set_log_internal(const char *filename, bool changed_name,
QEMU_LOCK_GUARD(&global_mutex);
logfile = global_file;
+ /* The per-thread flag is immutable. */
+ if (log_per_thread) {
+ log_flags |= LOG_PER_THREAD;
+ }
+
per_thread = log_flags & LOG_PER_THREAD;
if (changed_name) {