Skip to content

RHELMISC-29418: [rhel-virt-tools] v2v/libguestfs improved logging#37

Open
sparimi-rh wants to merge 1 commit intolibguestfs:masterfrom
sparimi-rh:rhelmisc-sub
Open

RHELMISC-29418: [rhel-virt-tools] v2v/libguestfs improved logging#37
sparimi-rh wants to merge 1 commit intolibguestfs:masterfrom
sparimi-rh:rhelmisc-sub

Conversation

@sparimi-rh
Copy link
Copy Markdown

The PR adds prefix to debug log statements generated by virt-v2v. The prefix format
is of form "virt-v2v: debug: "

@rwmjones
Copy link
Copy Markdown
Member

rwmjones commented Apr 6, 2026

Get rid of the RHELMISC-29418: [rhel-virt-tools] prefix in the commit message. We don't care about Red Hat's internal processes here.

The commit message also needs to say something useful about the change. Concentrate on the why not the what.

let shell_command ?(echo_cmd = true) cmd =
if echo_cmd then
debug "%s" cmd;
debug "%s: debug: %s" !prog cmd;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Author

@sparimi-rh sparimi-rh Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Updated the commit message - shortened the message
  2. Description now covers possible use case for how prefix might come into use
  3. 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants