In verbose mode, print the generated libvirt XML to stderr for
debugging, just like -o libvirt does.
---
v2v/output_local.ml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/v2v/output_local.ml b/v2v/output_local.ml
index 4e1088afc..c70428134 100644
--- a/v2v/output_local.ml
+++ b/v2v/output_local.ml
@@ -68,7 +68,13 @@ class output_local dir = object
let name = source.s_name in
let file = dir // name ^ ".xml" in
- with_open_out file (fun chan -> DOM.doc_to_chan chan doc)
+ with_open_out file (fun chan -> DOM.doc_to_chan chan doc);
+
+ if verbose () then (
+ eprintf "resulting local libvirt XML:\n%!";
+ DOM.doc_to_chan stderr doc;
+ eprintf "\n%!";
+ )
end
let output_local = new output_local
--
2.17.1