This wires up the emulator 'debug' parameter to control the /usr/bin/swtpm 'level' parameter for logging. Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> --- src/qemu/qemu_tpm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index bf0c6bcb0d..2f17918cbb 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -611,7 +611,11 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm, tpm->data.emulator.storagepath); virCommandAddArg(cmd, "--log"); - virCommandAddArgFormat(cmd, "file=%s", tpm->data.emulator.logfile); + if (tpm->data.emulator.debug != 0) + virCommandAddArgFormat(cmd, "file=%s,level=%u", tpm->data.emulator.logfile, + tpm->data.emulator.debug); + else + virCommandAddArgFormat(cmd, "file=%s", tpm->data.emulator.logfile); virCommandAddArg(cmd, "--terminate"); -- 2.45.1