Skip to content
Snippets Groups Projects
Commit b764e66c authored by Simon McVittie's avatar Simon McVittie
Browse files

pv-adverb: Use g_debug in preference to g_message for environment, etc.


As with commit e7fbf19e "pressure-vessel: Use g_debug for messages that
only show when verbose" in pv-wrap, if opt_verbose is true, then we know
we'll display these even if they are only at debug severity. Using
g_debug instead of g_message gives them the correct prefixes in the log,
and avoids a distracting level of highlighting in the systemd Journal.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 0be922fe
No related branches found
No related tags found
1 merge request!598log: Lower noisy messages to debug level
Pipeline #62302 passed
......@@ -1256,40 +1256,40 @@ main (int argc,
if (opt_verbose)
{
g_message ("Command-line:");
g_debug ("Command-line:");
for (i = 0; i < wrapped_command->argv->len - 1; i++)
{
g_autofree gchar *quoted = NULL;
quoted = g_shell_quote (g_ptr_array_index (wrapped_command->argv, i));
g_message ("\t%s", quoted);
g_debug ("\t%s", quoted);
}
g_assert (wrapped_command->argv->pdata[i] == NULL);
g_message ("Environment:");
g_debug ("Environment:");
for (i = 0; wrapped_command->envp != NULL && wrapped_command->envp[i] != NULL; i++)
{
g_autofree gchar *quoted = NULL;
quoted = g_shell_quote (wrapped_command->envp[i]);
g_message ("\t%s", quoted);
g_debug ("\t%s", quoted);
}
g_message ("Inherited file descriptors:");
g_debug ("Inherited file descriptors:");
for (i = 0; i < pass_fds->len; i++)
g_message ("\t%d", g_array_index (pass_fds, int, i));
g_debug ("\t%d", g_array_index (pass_fds, int, i));
g_message ("Redirections:");
g_debug ("Redirections:");
for (i = 0; i < assign_fds->len; i++)
{
const AssignFd *item = &g_array_index (assign_fds, AssignFd, i);
g_message ("\t%d>&%d", item->target, item->source);
g_debug ("\t%d>&%d", item->target, item->source);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment