RHELMISC-29418: [rhel-virt-tools] v2v/libguestfs improved logging#37
RHELMISC-29418: [rhel-virt-tools] v2v/libguestfs improved logging#37sparimi-rh wants to merge 1 commit intolibguestfs:masterfrom
Conversation
|
Get rid of the The commit message also needs to say something useful about the change. Concentrate on the why not the what. |
mltools/tools_utils.ml
Outdated
| let shell_command ?(echo_cmd = true) cmd = | ||
| if echo_cmd then | ||
| debug "%s" cmd; | ||
| debug "%s: debug: %s" !prog cmd; |
There was a problem hiding this comment.
so this only touches the shell_command function debug call, but what I'd rather see is the debug call itself be edited like this. see let info and let warning functions which already handle this similarly. then test it out and make sure the output doesn't look funky.
this change here for shell_command should actually be folded into your other PR #38, since they are both ways to run commands that virt-v2v uses. I missed that before
There was a problem hiding this comment.
- Updated the commit message - shortened the message
- Description now covers possible use case for how prefix might come into use
- Code modified as per slack discussion - so debug () would output the logs with prefix
"virt-v2v: debug: "
This change adds prefix "virt-v2v: debug:" to the Log statements generated by virt-v2v tool when it invokes the external program. Adding prefix to the generated log statements helps any external Log viewers to use the prefix in the framing the filter rules. For e.g. virt-v2v invokes openssl, nbdkit or nbdinfo or any other external programs, the prefix helps in filtering specific log statements.
The PR adds prefix to
debuglog statements generated byvirt-v2v. The prefix formatis of form
"virt-v2v: debug: "