summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/log.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/log.c b/util/log.c
index b7d2b6e09c..c2198badf2 100644
--- a/util/log.c
+++ b/util/log.c
@@ -209,6 +209,10 @@ static bool qemu_set_log_internal(const char *filename, bool changed_name,
/* The per-thread flag is immutable. */
if (log_per_thread) {
log_flags |= LOG_PER_THREAD;
+ } else {
+ if (global_filename) {
+ log_flags &= ~LOG_PER_THREAD;
+ }
}
per_thread = log_flags & LOG_PER_THREAD;