mu: use g_printerr for errors, instead of g_warning

With the new logging setup, we need g_printerr
This commit is contained in:
Dirk-Jan C. Binnema
2020-06-11 22:16:36 +03:00
parent 9b2746dce5
commit 68533cee0d
6 changed files with 26 additions and 30 deletions

View File

@ -1,5 +1,5 @@
/*
** Copyright (C) 2011-2019 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
** Copyright (C) 2011-2020 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
**
** This program is free software; you can redistribute it and/or modify it under
** the terms of the GNU General Public License as published by the Free Software
@ -368,7 +368,7 @@ run_cmd_cfind (const Mu::Store& store,
g_regex_unref (ecdata.rx);
if (ecdata.n == 0) {
g_warning ("no matching contacts found");
g_printerr ("no matching contacts found\n");
return MU_ERROR_NO_MATCHES;
}
@ -389,14 +389,14 @@ cfind_params_valid (const MuConfig *opts)
case MU_CONFIG_FORMAT_DEBUG:
break;
default:
g_warning ("invalid output format %s",
opts->formatstr ? opts->formatstr : "<none>");
g_printerr ("invalid output format %s\n",
opts->formatstr ? opts->formatstr : "<none>");
return FALSE;
}
/* only one pattern allowed */
if (opts->params[1] && opts->params[2]) {
g_warning ("usage: mu cfind [options] [<ptrn>]");
g_printerr ("usage: mu cfind [options] [<ptrn>]\n");
return FALSE;
}