Skip to content
Snippets Groups Projects
Commit 49ba5319 authored by Ludovico de Nittis's avatar Ludovico de Nittis :palm_tree:
Browse files

wrap: Use the log handler instead of g_printerr


We have our own log handler, so there is no need to use g_printerr()
directly.

Signed-off-by: default avatarLudovico de Nittis <ludovico.denittis@collabora.com>
parent 04896a8b
No related branches found
No related tags found
1 merge request!201Add an option to save the log to a file
...@@ -1247,10 +1247,8 @@ main (int argc, ...@@ -1247,10 +1247,8 @@ main (int argc,
if (g_getenv ("STEAM_RUNTIME") != NULL) if (g_getenv ("STEAM_RUNTIME") != NULL)
{ {
g_printerr ("%s: This program should not be run in the Steam Runtime.", g_warning ("This program should not be run in the Steam Runtime. "
g_get_prgname ()); "Use pressure-vessel-unruntime instead.");
g_printerr ("%s: Use pressure-vessel-unruntime instead.",
g_get_prgname ());
ret = 2; ret = 2;
goto out; goto out;
} }
...@@ -1344,8 +1342,8 @@ main (int argc, ...@@ -1344,8 +1342,8 @@ main (int argc,
g_assert (opt_graphics_provider != NULL); g_assert (opt_graphics_provider != NULL);
if (opt_graphics_provider[0] != '\0' && opt_graphics_provider[0] != '/') if (opt_graphics_provider[0] != '\0' && opt_graphics_provider[0] != '/')
{ {
g_printerr ("%s: --graphics-provider path must be absolute, not \"%s\"\n", g_warning ("--graphics-provider path must be absolute, not \"%s\"",
g_get_prgname (), opt_graphics_provider); opt_graphics_provider);
goto out; goto out;
} }
...@@ -1383,8 +1381,7 @@ main (int argc, ...@@ -1383,8 +1381,7 @@ main (int argc,
if (argc < 2 && !opt_test && !opt_only_prepare) if (argc < 2 && !opt_test && !opt_only_prepare)
{ {
g_printerr ("%s: An executable to run is required\n", g_warning ("An executable to run is required");
g_get_prgname ());
goto out; goto out;
} }
...@@ -1398,8 +1395,7 @@ main (int argc, ...@@ -1398,8 +1395,7 @@ main (int argc,
if (opt_terminal == PV_TERMINAL_NONE && opt_shell != PV_SHELL_NONE) if (opt_terminal == PV_TERMINAL_NONE && opt_shell != PV_SHELL_NONE)
{ {
g_printerr ("%s: --terminal=none is incompatible with --shell\n", g_warning ("--terminal=none is incompatible with --shell");
g_get_prgname ());
goto out; goto out;
} }
...@@ -1462,9 +1458,8 @@ main (int argc, ...@@ -1462,9 +1458,8 @@ main (int argc,
} }
else else
{ {
g_printerr ("%s: Either --home, --freedesktop-app-id, --steam-app-id " g_warning ("Either --home, --freedesktop-app-id, --steam-app-id "
"or $SteamAppId is required\n", "or $SteamAppId is required");
g_get_prgname ());
goto out; goto out;
} }
...@@ -1476,9 +1471,8 @@ main (int argc, ...@@ -1476,9 +1471,8 @@ main (int argc,
if (equals == NULL) if (equals == NULL)
{ {
g_printerr ("%s: --env-if-host argument must be of the form " g_warning ("--env-if-host argument must be of the form "
"NAME=VALUE, not \"%s\"\n", "NAME=VALUE, not \"%s\"", opt_env_if_host[i]);
g_get_prgname (), opt_env_if_host[i]);
goto out; goto out;
} }
} }
...@@ -1486,8 +1480,7 @@ main (int argc, ...@@ -1486,8 +1480,7 @@ main (int argc,
if (opt_only_prepare && opt_test) if (opt_only_prepare && opt_test)
{ {
g_printerr ("%s: --only-prepare and --test are mutually exclusive", g_warning ("--only-prepare and --test are mutually exclusive");
g_get_prgname ());
goto out; goto out;
} }
...@@ -1498,16 +1491,14 @@ main (int argc, ...@@ -1498,16 +1491,14 @@ main (int argc,
if (strchr (opt_filesystems[i], ':') != NULL || if (strchr (opt_filesystems[i], ':') != NULL ||
strchr (opt_filesystems[i], '\\') != NULL) strchr (opt_filesystems[i], '\\') != NULL)
{ {
g_printerr ("%s: ':' and '\\' in --filesystem argument " g_warning ("':' and '\\' in --filesystem argument "
"not handled yet\n", "not handled yet");
g_get_prgname ());
goto out; goto out;
} }
else if (!g_path_is_absolute (opt_filesystems[i])) else if (!g_path_is_absolute (opt_filesystems[i]))
{ {
g_printerr ("%s: --filesystem argument must be an absolute " g_warning ("--filesystem argument must be an absolute "
"path, not \"%s\"\n", "path, not \"%s\"", opt_filesystems[i]);
g_get_prgname (), opt_filesystems[i]);
goto out; goto out;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment