repmgr: use --compact (not --terse) in "cluster events" to hide details column

This is consistent with usage elsewhere.

"--terse" is intended to reduce logging noise.
This commit is contained in:
Ian Barwick
2019-05-30 14:19:37 +09:00
parent 06a83247c9
commit d4df0055c9
4 changed files with 7 additions and 3 deletions

View File

@@ -16,6 +16,7 @@
as reported by each individual node (Ian)
repmgr: in "cluster show" and "daemon status", check if a node is attached
to its advertised upstream node
repmgr: use --compact rather than --terse option in "cluster event" (Ian)
repmgr: prevent a standby being cloned from a witness server (Ian)
repmgr: prevent a witness server being registered on the cluster primary (John)
repmgr: ensure BDR2-specific functionality cannot be used on

View File

@@ -45,7 +45,7 @@
</itemizedlist>
</para>
<para>
The "Details" column can be omitted by providing <literal>--terse</literal>.
The &quot;Details&quot; column can be omitted by providing <literal>--compact</literal>.
</para>
</refsect1>

View File

@@ -382,6 +382,7 @@ do_cluster_show(void)
* --node-[id|name]
* --event
* --csv
* --compact
*/
void
@@ -427,11 +428,11 @@ do_cluster_event(void)
strncpy(headers_event[EV_DETAILS].title, _("Details"), MAXLEN);
/*
* If --terse or --csv provided, simply omit the "Details" column.
* If --compact or --csv provided, simply omit the "Details" column.
* In --csv mode we'd need to quote/escape the contents "Details" column,
* which is doable but which will remain a TODO for now.
*/
if (runtime_options.terse == true || runtime_options.output_mode == OM_CSV)
if (runtime_options.compact == true || runtime_options.output_mode == OM_CSV)
column_count --;
for (i = 0; i < column_count; i++)
@@ -1462,6 +1463,7 @@ do_cluster_help(void)
printf(_(" --event filter specific event\n"));
printf(_(" --node-id restrict entries to node with this ID\n"));
printf(_(" --node-name restrict entries to node with this name\n"));
printf(_(" --compact omit \"Details\" column"));
printf(_(" --csv emit output as CSV\n"));
puts("");

View File

@@ -1945,6 +1945,7 @@ check_cli_parameters(const int action)
switch (action)
{
case CLUSTER_SHOW:
case CLUSTER_EVENT:
case DAEMON_STATUS:
break;
default: