aboutsummaryrefslogtreecommitdiff
path: root/softmmu/vl.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-04-17 11:30:10 -0700
committerRichard Henderson <richard.henderson@linaro.org>2022-04-20 10:51:11 -0700
commitb2528af10abea3d19aa42b33a65060ce3ff505cd (patch)
treea36c8f497fbd49fd42a70acc32d193f525b1b6c8 /softmmu/vl.c
parentb410253f9fcb8d940469a20e732f51f6e43b1265 (diff)
softmmu: Use qemu_set_log_filename_flags
Perform all logfile setup at startup in one step. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220417183019.755276-31-richard.henderson@linaro.org>
Diffstat (limited to 'softmmu/vl.c')
-rw-r--r--softmmu/vl.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/softmmu/vl.c b/softmmu/vl.c
index fe9de2f896..f679d48d74 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -2560,19 +2560,16 @@ static void qemu_process_early_options(void)
#endif
/* Open the logfile at this point and set the log mask if necessary. */
- if (log_file) {
- qemu_set_log_filename(log_file, &error_fatal);
- }
- if (log_mask) {
- int mask;
- mask = qemu_str_to_log_mask(log_mask);
- if (!mask) {
- qemu_print_log_usage(stdout);
- exit(1);
+ {
+ int mask = 0;
+ if (log_mask) {
+ mask = qemu_str_to_log_mask(log_mask);
+ if (!mask) {
+ qemu_print_log_usage(stdout);
+ exit(1);
+ }
}
- qemu_set_log(mask, &error_fatal);
- } else {
- qemu_set_log(0, &error_fatal);
+ qemu_set_log_filename_flags(log_file, mask, &error_fatal);
}
qemu_add_default_firmwarepath();